Question: I'm needing help programming this in a C++. Using the flowchart for Lab #08 as a guide, write a C++ program that does the same

I'm needing help programming this in a C++.

Using the flowchart for Lab #08 as a guide, write a C++ program that does the same thing. Your C++ program must also use procedures (called functions in C++) to input the student responses, and determine how many answers were correct.

Remember Raptor arrays start at 1, but C++ arrays start at 0.

Here is what the function header for inputAnswers should look like;

void inputAnswers(int givenAnswers[ ] )

The numberCorrect function should return an int.

And the flowchar is as follows-

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 students responses in an array and then compares those responses to the correct answers to determine the students grade.

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. setCorrectAnswers takes an out parameter, corrrectAnswers, 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, givenAnswers 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.

numberCorrect takes both correctAnswers and givenAnswers as in parameters and has an integer out parameter, numRight. It sets numRight to the number of questions the student answered correctly.

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%

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!