Question: C++ 2. Write a program that prompts the user to input a radius in centimeters and calculates and then prints the area of a circle,

 C++ 2. Write a program that prompts the user to input

C++

2. Write a program that prompts the user to input a radius in centimeters and calculates and then prints the area of a circle, volume of a sphere, and surface area of a sphere with that radius. Define PI as a defined constant using a preprocessor command with a value of 3.14159265 or declare pi as a constant variable. Use data type double for all variables. Using a complete sentence, print the circle area as a decimal with 2 digits following the decimal point. Include units. Using a complete sentence, print the volume of the sphere in exponential format with 4 digits following the decimal point when written in exponential notation. 41 r (Use the formula V Beware of truncating 3.0 the fraction 4/3.) Include units. Again using a complete sentence, output the surface area of the sphere in g format with 5 significant digits. Include units

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!