Brijmohan lal Sahu - Facebook
Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Saturday, November 8, 2014

Program to take the radius of a sphere as input and print the volume and surface area of the sphere in C.

circle volume



Code Box
-------------------------------------------

/*Program to take the radius of a sphere as input and print
the volume and surface area of the sphere */

#include<stdio.h>
#include<conio.h>
void main()
{
float radius,volume,sarea;
clrscr();

printf("\nEnter radius of circle:");
scanf("%f",&radius);

printf("\nVoume=");
volume=(4/3)*3.413*radius*radius*radius;
printf("%f",volume);

printf("\n\n");

sarea=4*3.412*radius*radius;
printf("\nSurface area = %f",sarea);

printf("\n");
getch();
}

No comments: