#include<conio.h>
#include<stdio.h>
#define PI 3.14
void main()
{
float volume(int);
int r;
float vol;
clrscr();
printf("enter the radius\n");
scanf("%d",&r);
vol=volume(r);
printf("the volume of sphere is %f",vol);
getch();
}
float volume(int r)
{
float v;
v=(4*PI*r*r*r)/3;
return(v);
}
#include<stdio.h>
#define PI 3.14
void main()
{
float volume(int);
int r;
float vol;
clrscr();
printf("enter the radius\n");
scanf("%d",&r);
vol=volume(r);
printf("the volume of sphere is %f",vol);
getch();
}
float volume(int r)
{
float v;
v=(4*PI*r*r*r)/3;
return(v);
}
No comments:
Post a Comment