Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions