Question: This coding is for C++ Write a program that displays the following menu: Enter 1 to calculate the area of a circle Enter 2 to
This coding is for C++
Write a program that displays the following menu:
Enter 1 to calculate the area of a circle Enter 2 to calculate the area of a rectangle Enter 3 to calculate the area of a triangle
If the user enters 1, it prompts the user for the radius and calculates the area of a circle with that radius. If the user enters 2, it prompts the user for the length and width and calculates the area of a rectangle with these dimensions (area = length * width). If the user enters 3, it prompts the user for the base and height and calculates the area of a triangle with these dimensions (area= 1/2 base * height). If the user enters any other number outside the range 1-3, the program displays an error message.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
