Write a program that defines the named constant PI, const double PI = XXXXXXXXXX;, which stores the value of π. The program should use PI and the functions listed in Table 6-1 to accomplish the...


Write a program that defines the named constant PI, const double PI = 3.14159;, which stores the value of π. The program should use PI and the functions listed inTable 6-1 to accomplish the following:



  • Output the value of √π .

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

    • The value of4.0πr², which is the surface area of the sphere.

    • The value of(4.0/3.0)πr³, which is the volume of the sphere.





Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here