Question: Sample problem: Programming The formula for the volume of a sphere is 4 where is 3.14159 and r is the radius of the sphere. Write
Sample problem: Programming The formula for the volume of a sphere is 4 where is 3.14159 and r is the radius of the sphere. Write a function named volume that accepts a radius as an argument. The function should return the volume of a sphere having that radius. Demonstrate the function by calling it in a loop in the main function that displays a table of volumes of circles with radius values 1 through 10. Your function should work properly if the radius has a fractional part (i.e. 5.89)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
