Make a program that calculates and print the volume of a sphere given the radius (R) of the circle. The formula to calculate the volume is: (4/3) * pi * R3. For the purposes of this problem the value of pi is 3.14159.
Tip: Use (4/3.0) or (4.0/3) in your formula, because some languages (including C++) assume that the result dividing two integers is another integer. :)
The input file contain an integer number.
The output file will contain a message like the following example. Remember the space before and after the equal signal. The value must be printed with 3 digits after the decimal point.
|Sample Inputs||Sample Outputs|
|3||VOLUME = 113.097|
|15||VOLUME = 14137.155|
|1523||VOLUME = 14797486501.627|
#define pi 3.14159
printf(“VOLUME = %.3f\n”, 4.0 / 3.0 * pi * (r * r * r));