Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C + + Program Specifications Create a menu - driven program that calculates and displays the areas of two different objects: squares and circles. The
C Program Specifications
Create a menudriven program that calculates and
displays the areas of two different objects: squares and
circles.
The menu should have the following three choices:
square
circle quit
if the user selects choice the program shall ask
the user for the side length of the square can be a
decimal number and shall calculate the area of the
square and output it as shown in the sample run to
the right.
if the user selects choice the program shall ask
the user for the radius of the circle can be a
decimal number and shall calculate the area of the
circle and output it as shown in the sample run to
the right. Use for the value of pi
If the user selects choice the program shall quit
after outputting an additional newline.
if the user enters a value for choice that is not in
the range then the program shall output an
error message as shown in the sample run to the
right and will then redisplay the menu.
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