Question: Create a C program to calculate the area of a rectangle is length x width, triangle is 0 . 5 x length x base and

Create a C program to calculate the area of a rectangle is length x width, triangle is 0.5 x length x base and circle is pi x radius x radius. The program should continue to prompt for a selection until the choice to quit is selected. A constant will be used to store the pi with a value of 3.14159265358979323846 to be used to find the area of a circle.
Program Requirements
1. The program should prompt the user to select the shape.
2. After choice selected, prompt the user to enter the measurements.
3. Input the information using 'scanf' and print the results of the calculation 'printf'.
4. All your code should be contained in the main() function of your program.
***** No functions should be used. Points deduction for using functions. *****
Input Requirements
1. All of the input should be real numbers. (float)
2. The input value should not be below 0.0.
3. Invalid input should be followed with descriptive messages of expected input parameters.
Output Requirements
1. All output should send to standard output.
2. The output from the calculations should be descriptive.
3. The output should always be formatted with two decimal points.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!