This program started in Programming Challenge 15 of Chapter
This program started in Programming Challenge 15 of
Chapter
3
,
and was modified
in Programming Challenge 9 of
Chapter
4
.
Modify the program again so it displays a
menu allowing 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.
Solution
while(1)
{
cout<<\"Enter choice as 1)Addition 2)Subtraction 3) Multiplication 4) Division and 5) Quit\ \";
cin>>choice;
switch(choice)
{
case :1..….....// Necessary required for addition
break;
case :2.......// Necessary required for subtraction
break;
case:3......//muliplication
break;
case 4:....// Division
brea;
case:5
exit(0);
}
}//loops until user presses5 to quit
..... in the above code represents the code required..
As the code is not properly mentioned in the question,...should be substituted as the code mentioned in previous chapters

