/* 1. Write a C Program to read radius and find surface area and volume of a sphere. */
#define PI 3.1428
void main()
{
int radius;
float area, volume;
clrscr();
printf("Enter the radius:");
scanf("%d",&radius);
area=4*PI*radius*radius;
volume=4/3*PI*radius*radius*radius;
printf("Area of Sphere=%f\n",area);
printf("Volume of Sphere=%f\n",volume);
getch();
}
No comments :
Post a Comment