Display a menu to allow the user to select an addition, subtraction, multiplication, or division problem. The final selection on the menu should let the user quit the program. After the user has finished the math problem, the program should display the menu again. This process is repeated until the user chooses to quit the program. Input Validation: If the user selects an item not on the menu, display an error message and display the menu again. coing should be in c++
Display a menu to allow the user to select an addition, subtraction, multiplication, or
division problem. The final selection on the menu should let the user quit the
After the user has finished the math problem, the program should display the menu again.
This process is repeated until the user chooses to quit the program.
Input Validation: If the user selects an item not on the menu, display an error message
and display the menu again.
coing should be in c++
i upload the sccrenshot please check and output should look like the screenshot
The code is given below according to the question as 4 independent functions addition, subtraction, multiplication, and division are separately implemented. In the code, comments have also been added so it will easy to understand the flow of the code. The code consists of the menu-driven loop where the user has to select the operation he wants to perform and then solve the operation on the two operands generated randomly such as for addition, let's say the two operands generated are 5 and 4, so the user would have to submit correct and for that addition 5+4=9.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 6 images