Question: this is a C++. use visual studios 3) Calculate the volume of a water bottle shown below. The bottle is made up of 2 sections,

this is a C++. use visual studios

this is a C++. use visual studios 3) Calculate the volume of

3) Calculate the volume of a water bottle shown below. The bottle is made up of 2 sections, a cylindrical piece and a spherical piece. Define PI as a constant using one of the methods mentioned in class and use appropriate math library functions when performing calculations Prompt the user for the radius of the spherical portion and the radius and height of the cylindrical portion. Calculate volumes of the spherical portion, the cylindrical portion, and the total volume of the bottle. Use the following formulas: Volume of cylinder: V(cyl)- rh Volume of sphere: V(sph) =-m2 Print the individual volumes of the cylinder and spherical parts of the water as well as the total volume of the water bottle. Print your answers to 4 decimal places. Test with values t(sphere)-5 , r(sn-2 cm, and h = 8 cm. height usphere)

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!