Program
#include <stdio.h>
int main()
{
float r,v,a;
printf("*************************************************");
printf("\n*************************************************");
printf("\n** WAP to find area and volume of a sphere **");
printf("\n** Created by Sheetal Garg **");
printf("\n** Assistant Professor **");
printf("\n** Phone No:9467863365 **");
printf("\n*************************************************");
printf("\n*************************************************");
printf("\nenter radius of sphere");
scanf("%f",&r);
v= 1.33*3.14*r*r*r;
a=4*3.14*r*r;
printf("area is : %f\n",a);
printf("volume is : %f\n",v);
return 0;
}
Output
************************************************* ************************************************* ** WAP to find area and volume of a sphere ** ** Created by Sheetal Garg ** ** Assistant Professor ** ** Phone No:9467863365 ** ************************************************* ************************************************* enter radius of sphere 5 area is : 314.000000 volume is : 522.025024