2 ShowPaper
2 ShowPaper
==================================================================
INSTRUCTIONS - PRACTICAL EXAM - PRF192
- PLEASE READ BEFORE STARTING YOUR EXAM
Software Requirements
Dev C++ (4.9.9.2 or 5.11) on Windows 7 and above.
Instructions
Step 1: Students download given materials from exam software.
Step 2: Students read questions and prepare answers in the given template.
Step 3: Prepare to submit answer:
o For each question (e.g., question 1), please create two sub-folders: run and
src.
o Copy *.exe file into run folder, *.c file into src folder.
Step 4: Submit solution for each question:
o Choose question number (e.g., 1) in PEA software, and then attach
corresponding solution folder (e.g., 1). Click Submit button to finish
submitting this question.
Notes
Solutions will be marked by Automated Marking Software.
==================================================================
(2 marks)
The given file Q1.cpp already contains statements to input data for 3 variables a, b and c. You
should write statements so that print out the average of three numbers.
Notes:
- Do not edit given statements in the main function.
Question 2:
==================================================================
INSTRUCTIONS - PRACTICAL EXAM - PRF192
- PLEASE READ BEFORE STARTING YOUR EXAM
Software Requirements
Dev C++ (4.9.9.2 or 5.11) on Windows 7 and above.
Instructions
Step 1: Students download given materials from exam software.
Step 2: Students read questions and prepare answers in the given template.
Step 3: Prepare to submit answer:
o For each question (e.g., question 2), please create two sub-folders: run and
src.
o Copy *.exe file into run folder, *.c file into src folder.
Step 4: Submit solution for each question:
o Choose question number (e.g., 2) in PEA software, and then attach
corresponding solution folder (e.g., 2). Click Submit button to finish
submitting this question.
Notes
Solutions will be marked by Automated Marking Software.
==================================================================
(3 marks)
The given file Q2.cpp already contains statements to input a variable n. You should write
statements so that sum all numbers from 1 to n
Notes:
- Do not edit given statements in the main function.
Question 3:
==================================================================
INSTRUCTIONS - PRACTICAL EXAM - PRF192
- PLEASE READ BEFORE STARTING YOUR EXAM
Software Requirements
Dev C++ (4.9.9.2 or 5.11) on Windows 7 and above.
Instructions
Step 1: Students download given materials from exam software.
Step 2: Students read questions and prepare answers in the given template.
Step 3: Prepare to submit answer:
o For each question (e.g., question 3), please create two sub-folders: run and
src.
o Copy *.exe file into run folder, *.c file into src folder.
Step 4: Submit solution for each question:
o Choose question number (e.g., 3) in PEA software, and then attach
corresponding solution folder (e.g., 3). Click Submit button to finish
submitting this question.
Notes
Solutions will be marked by Automated Marking Software.
==================================================================
(2 marks)
The given file Q3.cpp already contains statements to input data for the integer array. You should
write statements so that print out the sum divisors of n.
Notes:
- Do not edit given statements in the main function.
Sample input and output:
Input: n = 10
After processing: 1+2+5 = 8
Output for marking:
OUTPUT:
8
Question 4:
====================================================================
INSTRUCTIONS - PRACTICAL EXAM - PRF192
- PLEASE READ BEFORE STARTING YOUR EXAM
Software Requirements
Dev C++ (4.9.9.2 or 5.11) on Windows 7 and above.
Instructions
Step 1: Students download given materials from exam software.
Step 2: Students read questions and prepare answers in the given template.
Step 3: Prepare to submit answer:
o For each question (e.g., question 4), please create two sub-folders: run and
src.
o Copy *.exe file into run folder, *.c file into src folder.
Step 4: Submit solution for each question:
o Choose question number (e.g., 4) in PEA software, and then attach
corresponding solution folder (e.g., 4). Click Submit button to finish
submitting this question.
Notes
Solutions will be marked by Automated Marking Software.
===================================================================
(3 marks)
The given file Q4.cpp already contains statements to input data for 1D-array named a. You
should write statements so that print out all even elements of array a.
Notes:
- Do not edit given statements in the main function.
Sample input and output:
Input: n = 5, Array: 5 4 1 6 2
Output for marking:
OUTPUT:
4 6 2