Write a C++ code to compute the surface area, volume, and if applicable the lateral surface area of spheres and/or cylinders. Your program should ask users whether they want to find the above values for another shape. By answering 'Y' or 'y' users decide to compute another shape. You also need to ask for number of decimal points, n, (precision) for your output. You will use several functions in your program. These functions are described below. You need to determine appropriate type for the function and the parameters. In the case that the input values are not reasonable (example: negative radius or height) your code will display error messages.
Description : This function displays a message regarding what your program will do. It will display on the screen what the inputs and outputs are and it will explain how the program works.
Sphere_area : This function will compute the surface area of an sphere using the following formula:
Sphere_volume : This function will compute the volume of a sphere using the following formula:
Total_Cylinder_area : This function will compute the total surface area of a cylinder using the following formula:
Lateral_Cylinder_Area : This function will compute the lateral surface area of a cylinder using the following formula:
Print_it : This function will print any number x with n decimal points only. Both x and n are the parameters passed to this function. X could be any one of the above values.
To receive full credit, the electronic copy must be submitted as assgn2.C
by midnight Tuesday Feb. 20, you are required to submit the hardcopy
of your code in class on Wednesday 21. Please note that documentation
and indentation counts for 10 points. YOUR CODE WILL NOT BE GRADED
WITHOUT A HARDCOPY.