Question: use standard C++ Write a program named, mathTrainer .cpp . This program will help a young math student practice the four basic operations. This program

use standard C++

Write a program named, mathTrainer.cpp. This program will help a young math student practice the four basic operations. This program begins by displaying for the user a menu of choices. The choices will be either to create a random problem for one of the four operations or to quit the application. You can see from the example execution log for Math Trainer that the menu consists of choices that allow the user to have the program create a problem or quit.

Here are more specific requirements for the different options.

Addition Problems - Both operands should be random numbers in the range, 1 to 500, inclusive. - Use the '+' as the addition operator symbol

Subtraction Problems - Both operands should be random numbers in the range, 1 to 999, inclusive - But the second operand, (the number being subtracted from the top number) should be less than or equal to the first operand This ensures that the answers to subtraction problems are never negative - Use the '-' as the subtraction operator symbol

Multiplication Problems - The first operand (top number) must be in the range of 1 to 100, inclusive. - The second operand (bottom number) must be in the range of 1 to 9, inclusive. - Use the 'X' as the multiplication operator symbol

Division Problems - Display these problems horizontally as: Operand1 / Operand2 = , a.k.a, Dividend / Divisor = - The range for the divisor (operand 2) must be from 1 to 9, inclusive - The dividend (operand 1) must have a value such that the resulting quotient is always in the range of 1 to 50, inclusive

Remember to use named constants (const) for all hard values found in the requirements or implied by them. In this program all of the minimum and maximum range values should be named constants.

Notes: Make sure you generate numbers in the proper range. Test your program to see that you generatedifferent numbers each time. This is accomplished by seeding the generator each time the program runs. Make sure your output is formatted like the examples given above.

Ex.

Math Trainer Menu ------------------------------ 1. Addition problem 2. Subtraction problem 3. Multiplication problem 4. Division problem 5. Quit this program ------------------------------ Enter your choice (1-5): 1 148 + 36 ----- 184 Congratulations! That's right. 

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!