Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

Describe the basic structure of a union.

Answered: 1 week ago

Question

what is the most common cause of preterm birth in twin pregnancies?

Answered: 1 week ago

Question

Which diagnostic test is most commonly used to confirm PROM?

Answered: 1 week ago

Question

What is the hallmark clinical feature of a molar pregnancy?

Answered: 1 week ago