Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 4r2, which is the surface area of the sphere
(ii) The value of (4/3)r3 , which is the volume of the sphere
Transcribed image textStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started