Question
You are required to write a C program that will calculate the following: Perimeter: Square, Rectangle, Triangle, Circle. Area: Square, Rectangle, Triangle, Circle. Volume: Cube,
You are required to write a C program that will calculate the following:
Perimeter: Square, Rectangle, Triangle, Circle.
Area: Square, Rectangle, Triangle, Circle.
Volume: Cube, Rectangular Prism, Triangular Pyramid, Sphere.
DETAILS Your program must allow the user to choose whether they want to calculate the Perimeter, Area or Volume. Provide a menu. Once theyve chosen their calculation from the Perimeter, Area or Volume menu your program must provide a menu with the available geometric shapes in the corresponding option. You must provide a menu again. Your program must include at least: one switch statement, repetition structures, and if/else statements.
Your program must have the following 4 user defined functions:
void Menu(void); //displays a menu to the user
double perimeterSquare(float length); //returns the perimeter of a square with a given length
double areaSquare(float length); //returns the area of a square with a given length
double volumeSquare(float length); //returns the volume of a square or cube with a given length
You will add at least 3 more user defined functions.
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