1 #include <stdio.h> 2 #include <math.h> 3 #define PI 3.1415926 4 5 int main(){ 6 double r; 7 double v; 8 9 while(scanf("%lf",&r)!=EOF){ 10 v=PI*4*r*r*r/3; 11 v=floor(v+0.5); 12 13 printf("%.0lf\n",v); 14 } 15 return 0; 16 }
原文:http://www.cnblogs.com/zqxLonely/p/4098152.html