Design and test a C program to compute volume and surface area of a sphere.

Code

#include <stdio.h>
int main()
{
int radius=37;
double pie=3.14285714286;
double area_sphere=4*pie*(radius*radius);
double volume=(4.0/3.0)*pie*(radius*radius*radius);
printf("Surface area of the sphere=%f\n",area_sphere);
printf("Volume of the sphere=%f\n",volume);
}
Output



Try to get radius from user using scanf() function