c program to find the volume and surface area of sphere | Program to find area of sphere in C language | C Language Volume of Sphere
#include#include int main(){ float r; float surface_area,volume; printf("Enter radius of the sphere : "); scanf("%f",&r); surface_area = 4* M_PI * r * r; volume = (4.0/3) * M_PI * r * r * r; printf("Surface area of sphere is: %.3f",surface_area); printf("\nVolume of sphere is : %.3f",volume); return 0; }
No comments:
Post a Comment