Question: Write a program to calculate geometric information on a cylinder of specified radius and height, using the following steps. Prompt the user for the radius

 Write a program to calculate geometric information on a cylinder of

Write a program to calculate geometric information on a cylinder of specified radius and height, using the following steps. Prompt the user for the radius of the cylinder using the input function. Don't forget the semicolon at the end of the line, otherwise the value will echo to the screen. Prompt the user for the height of the cylinder using the input function. Calculate the following parameters. Note that the built-in variable pi contains thevalue of : a. Area of end-r b. Perimeter of end-2r c. Area of side perimeter of end times height d. Total surface area total area of both ends plus area of side e. Volume- area of end times height Print all 5 of these results to the screen using fprintf, Print one result per line. Specify 2 decimal places. Test the program using inputs r = 3 and h-5. The results for the 5 calculated values from step 3 should be a) 28.27, b) 18.85, c) 94.25, d) 150.80, e) 1441.37

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 Databases Questions!