Question: C++ Help Computers are playing an increasing role in education. Write a program that will help an elementary school student learn multiplication. Use rand to

C++ Help

Computers are playing an increasing role in education. Write a program that will help an elementary school student learn multiplication. Use rand to produce two positive one-digit integers. The program should then output a question using the numbers, such as:

How much is 6 times 7?

The student then types the answer. The program checks the students answer. If it is correct, print "Very good!", and ask another multiplication question. If the answer is wrong, print "No. Please try again.", and let the student try the same question repeatedly until the student gets it right.

Hints:

Use sentinel-controlled repetition to limit the number of questions that the program asks the user. At the same time, check that the user has entered the correct answer. Seed the rand function with srand to randomize the program

Sample output:

Enter -1 to End.

How much is 4 times 9 (-1 to End)?

36 Very good!

How much is 7 times 0 (-1 to End)?

0 Very good! How much is 7 times 8 (-1 to End)? 55

No. Please try again. ?

56 Very good!

How much is 5 times 0 (-1 to End)? -1

That's all for now. Bye.

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!