Problem Statement
Write a program that calculates the volume of a sphere given its radius r.
Use the formula: Volume = (4/3) * PI * pow(r, 3). Use 3.14159 for PI.
DEMO-C-32 โข Programming in C
Write a program that calculates the volume of a sphere given its radius r.
Use the formula: Volume = (4/3) * PI * pow(r, 3). Use 3.14159 for PI.
r.The volume formatted to 2 decimal places.
Submit runs every public testcase in this browser. Results and code never leave this device.
1.0
4.19
3.0
113.10
5.0
523.60
10.0
4188.79
C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.
/workspace/question