hdu2002
计算球体积
http://acm.hdu.edu.cn/showproblem.php?pid=2002
#include <stdio.h>
int main() {
double r;
while(scanf("%lf", &r) != EOF)
printf("%.3f\n", 4.0/3.0*3.1415927*r*r*r);
}注:此题有bug,PI不能取得太精确,否则会WA。
http://acm.hdu.edu.cn/showproblem.php?pid=2002
#include <stdio.h>
int main() {
double r;
while(scanf("%lf", &r) != EOF)
printf("%.3f\n", 4.0/3.0*3.1415927*r*r*r);
}注:此题有bug,PI不能取得太精确,否则会WA。