Question: Write an interactive language program that prompts the user to input the height and radius of a cylinder (both of type double) and calls two
Write an interactive language program that prompts the user to input the height and radius of a cylinder (both of type double) and calls two functions: CalcArea to calculate the total area of CalcVolume to calculate the volume of the cylinder. The main function then prints the results returned by these functions preceded by appropriate messages. Your program should terminate when the user indicates that it is not desired to run the program for another cylinder. All output values must be displayed using digits for fraction. Recall that: the total area of a cylinder is given by A = 2 pi r (h + r) and the volume of a cylinder is given by V = pi r^2 h. where r is the radius of the circular bases and h is the height of the cylinder
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
