Question: Add a do-while loop to the program so that the user can repeatedly display the menu, make a choice, and have the appropriate steps for
Add a do-while loop to the program so that the user can repeatedly display the menu, make a choice, and have the appropriate steps for that choice carried out. The loop should continue iterating until the user enters 4 for the menu choice. Have the program print several blank lines after each case is carried out before the menu displays again. Once the program compiles with no errors, test it with a single run that tries all menu choices before entering 4 to quit. Design and implement the areas.cpp program so that it correctly meets the program specifications given below. Specifications: Create a menu-driven program that finds and displays areas of 3 different objects. The menu should have the following 4 choices: 1--square 2--circle 3--right triangle 4--quit If the user selects choice 1, the program should find the area of a square. If the user selects choice 2, the program should find the area of a circle. If the user selects choice 3, the program should find the area of a right triangle. If the user selects choice 4, the program should quit without doing anything. If the user selects anything else (i.e., an invalid choice) an appropriate error message should be printed Sample Run Program to calculate areas of objects 1--square 2--circle 3--right triangle 4--quit Radius of the circle: 3.0 Area = 28.2743
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
