Question
USING DEV C++ Problem : You are to create an application for a school, using any programming language, that can be used as a math
USING "DEV C++"
Problem:
You are to create an application for a school, using any programming language, that can be used as a math for the three basic math operations: addition, subtraction, multiplication. In addition to an algebra. problem Complete the program as follow:
The application should display a menu for the user to select one of the four operations of their choice, and an additional choice if they want to exit the program. The menu will display 1. Addition, 2. Subtraction, 3. Multiplication, 4. Algebra, as shown below:
Addition
Subtraction
Multiplication
Algebra
If the user enters something outside of the given range above, an error message should be displayed to the user, and the user should be asked to re-enter the correct selection.
If the user selects option 1, addition, 2 random numbers should be generated between 1 50 and be displayed (using the correct output formatting below) to the user in the following format:
12
+ 15
-------
If the user selects option 2, subtraction, 2 random numbers should be generated between 1 50 and be displayed (using the correct output formatting below) to the user in the following format:
14
- 24
-------
If the user selects option 3, multiplication, 2 random numbers should be generated between 1 20 and be displayed (using the correct output formatting below) to the user in the following format:
17
X 3
-------
If the user selects option 4, Algebra, 2 random numbers should be generated between 1 100. The first random number will be part of the equation and the second random number will be the answer to the equation. The problem should display an equation where the first random number plus a missing number, X, adds to the second generated random number and should be displayed as shown below:
51 + X = 36
X is equal to:
The program should then wait for the user to enter an answer. If the answer is correct, a message stating the answer was correct should be printed. If the answer is incorrect, a message should be printed stating the answer was incorrect showing the correct answer.
Sample Application Output:
* Welcome to the math tutor program* elect a choice from the menu to continue. 1. Addition 2. Subtraction 3. Multiplication 4. Algebra Enter your selection: 4 You have selected Algebra Your problem is 51 36 X is equal to 15 Correct
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started