C Program To Compute Volume And Surface Area Of A Sphere
C Program To Compute Volume And Surface Area Of A Sphere
/* Author --> HARSH PATEL */
#include<stdio.h>
void main()
{
float volume,sa,r=5;
const float pi = 3.14;
volume = (4 * (pi*r*r*r)) / 3;
sa = 4 * pi * r * r;
printf("volume is %f and Surface area is %f",volume,sa);
}
output
volume is 523.333313 and Surface area is 314.000000
•now the program ends without any error.