Question
In C language , write a program to calculate the area of various shapes based on the choice from the user. the program should provide
In C language , write a program to calculate the area of various shapes based on the choice from the user.
the program should provide the user with a menu to select from
R-for retangle
T-for trapezoid
C-for circle
E-for end
the program should ask the for the proper input for every particular shape
A sample output may look like
This can fined the area of the following shapes :
R-rectangle
T-Trapezoid
C-Circle
E-End
Select your choice (R,T,C or E to end : R
Enter length : 50
Enter height : 20
The area of the rectangle is 1000.00 m^2
-------------------------------------------------------------------------
This can fined the area of the following shapes :
R-rectangle
T-Trapezoid
C-Circle
E-End
Select your choice (R,T,C or E to end : T
Enter base 1 : 20
Enter base 2 : 10
Enter height : 5
The area of the trapezoid is 75.00 m^2
-------------------------------------------------------------------------
This can fined the area of the following shapes :
R-rectangle
T-Trapezoid
C-Circle
E-End
Select your choice (R,T,C or E to end : C
Enter radius : 50
The area of the circle is 7857.14 m^2
-------------------------------------------------------------------------
This can fined the area of the following shapes :
R-rectangle
T-Trapezoid
C-Circle
E-End
Select your choice (R,T,C or E to end : e
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