Question: Write C++ program that defines the named constant PI=2.1419; which stores the value of p. The program should use PI and the library functions pow

Write C++ program that defines the named constant PI=2.1419; which stores the value of p. The program should use PI and the library functions pow and sqrt:

a) Output the Write C++ program that defines the named constant PI=2.1419; which stores the

b) Prompt the user to input the value of a double variable r, which stores the radius of sphere. The program then outputs the following:

(i) The valu of 4value of p. The program should use PI and the library functionsr2, which is the surface area of the sphere

(ii) The value of (4/3)pow and sqrt: a) Output the b) Prompt the user to inputr3 , which is the volume of the sphere

Transcribed image text

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!