英语翻译Course WorkWrite a program that will help an elementary
英语翻译
Course Work
Write a program that will help an elementary school pupils learn math.
a) The program will first ask the user of his/her ID number:
Please input your four digit ID no:1234
Then prompts two/three choices:
(1) Test
(2) Check scores
(3) Redo the last test (optional)
b) Test:the program will give 10 math problems:
12 * 3 = 36
48 + 32 = 80
…
56 / 28 = 2
Note:
i) The student answers every one problem before the next one is given.
ii) Randomly intermixes problems of addition,subtraction,multiplication and division.
iii) Randomly generates numbers for problems.However,must ensure that both the problem and the result are no larger than two digits.The problem and the result should be greater than or equal to zero.The divisor cannot be zero.
iv) After ten problems are finished,give score to this student.
v) Saves this student’s ID and score into a file named ‘record.txt’.
vi) Record the time that the student is used to do the ten problems.Also save it to the file ‘record.txt’.
c) Check scores:Searches the file ‘record.txt’ and lists all the historical scores including the working time for this student.
Your previous records are:
1234 80 150 seconds
1234 50 182 seconds
1234 90 98 seconds
d) Redo test (Optional):Asks the student to redo the problems that were wrong,ONE MORE TIME.If it is still not correct,tell him/her the correct answer.
Your programming report should include:
(1) Title page
(2) Pseudocode or flowchart to describe the algorithm of your program
(3) The C source file
(4) The printout on the screen
You will be marked based on your program’s:
(1) Correctiveness
(2) Readability
(3) Robustness
(4) Conciseness