Question: I want to write a program using (c) the program should ask the user the following 5 questions: What is 5 + 27? What is

I want to write a program using (c)

the program should ask the user the following 5 questions:

What is 5 + 27?

What is 2.7 - 0.85?

What is 2.3 - 0.1 * 4?

What is 123 * 123?

What is 945 / 5?

After the user is prompted to answer the first question, your program should read in the user input and store the value in an appropriate variable. Your program should then check if the users response was correct. If the users response was correct, your program should increment a variable that keeps track of the users points. One correct answer means one point for that question, one incorrect answer means zero points for that question. Your program should then repeat this process for the remaining questions. You will not need to do any input validation for this program.

After all of the questions have been asked and all of the answers have been recorded, your program should inform the user how many points they have scored, as well as a custom message based on their score. The messages that should be displayed are the following:

5 Points: You got all questions correct! Perfect!

4 Points: You only missed one question, good job!

3 Points: You missed two questions, try again for a better score!

2 Points: You missed 3 questions, practice your math skills more and try again!

1 Point: You only got one question right! I think you need to practice your math

skills. 0 Points:

You missed every question! You can do better than that!

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!