Starting from:

$25

Online math quiz grader Solved

For this assignment, you will write a program that grades an online math quiz. The program asks the student to enter his/her answer to 10 multiple-choice questions. All of the quiz answers are integers. The program stores the student’s responses in an array and then compares those responses to the correct answers to determine the student’s grade.
The correct answers are: 1 2 3 4 5 6 7 8 9 10
5 22 35 0 16 28 4 3 42 52
Your program must use this main procedure which calls the three procedures you are to implement. set Correct Answers takes an out parameter, corrrect Answers,
which is an array of integers. It sets each array element to the correct answer according to the table above. inputAnswers takes an out parameter, given Answers which is also an array of integers. It asks the student to input their answers to each of the 10 questions. This procedure must use a loop.number Correct takes both correct Answers and given Answers as in parameters and has an integer out parameter, numRight. It sets numRight to the number of questions the student answered correctly. Hints number Correct will require a selection nested inside a loop. Lessons #7 and #8 have examples
of inputting values into an array, and looping through those
values. You will perform similar actions for this assignment.
Sample Output (input in BOLD)
Please enter your answer for question #1 5
Please enter your answer for question #2 21
Please enter your answer for question #3 35
Please enter your answer for question #4 0
Please enter your answer for question #5 16
Please enter your answer for question #6 29
Please enter your answer for question #7 4
Please enter your answer for question #8 3
Please enter your answer for question #9 42
Please enter your answer for question #10 52
Your quiz grade is 80%
Extra Credit (10 Points)
For extra credit, modify your program so that it adds an extra line after the quiz grade that displays which question numbers the student got wrong. It could look like this:
You answered the following questions incorrectly: 2 6
You may either include the extra credit in your initial submission, or in an additional submission

More products