#include
int main()
{
double v,r,pi;
pi=3.141592
scanf("%lf",&r);
v=4.0/3.0*pi*r*r*r;
printf("%lf\n",v);
return 0;
}
是v=4/3π3v=4/3*3.14*(2.45*1/2)的3次方知道了嘛?
#include
#include
int main()
{
double r;
while(scanf("%lf",&r),1)
{
printf("%.3f\n",acos(-1)*r*r*r*4.0/3);
}
return 0;
}
#include
#define pi 3.141592
void main()
{
double V,r;
printf("please enter r:\n");
scanf("%lf",&r);
V=4/3*pi*r*r*r;
printf("r=%lf\nV=%lf\n",r,V);
}