Question: C ++ Program The formula for the volume of a box is length x width x height. Write a program that prompts the user for
C ++ Program
The formula for the volume of a box is length x width x height. Write a program that prompts the user for these values and calculates the volume of a box and displays the result. Test with these values: length: 1, width: 2, height: 3, volume (calculated): 6
The formula for the volume of a sphere is (4/ 3) pi r ^ 3. (Note that r ^ 3 means "r raised to the power of 3". Since you do not know how to raise a number to a power, you can do this by multiplying, i.e., (r x r x r).) Write a program that prompts for the radius and calculates the volume of a sphere and displays the result. Use 3.1415 as the value of PI.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
