Question
Write a program to calculate the area of four shapes (Rectangle, triangle, circle and square). The program to present the user with a menu where
Write a program to calculate the area of four shapes (Rectangle, triangle, circle and square).
The program to present the user with a menu where one of the shapes can be selected.
Based on the selection made, the user enters the proper input, the program validates the input
(i.e all entries must be greater than zero).
Once the input is entered and validated, the intended area is calculated and the entered information along with the area are displayed.
Area of the Square = Side ^2
Area of the Rectangle = Length * Width
Area of the Triangle = Base * Hight
Area of the Circle = PI * R^2
You MUST apply the following to your program:
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