题解 | #计算球体的体积#
计算球体的体积
https://www.nowcoder.com/practice/0f5d9bfcd63b47fda2052a583b1fbd1f
#include <stdio.h>
#define PI 3.1415926
int main() {
double a,v;
scanf("%lf",&a);
v=(4.0/3)*(a*a*a*PI);
printf("%.3lf",v);
return 0;
}
计算球体的体积
https://www.nowcoder.com/practice/0f5d9bfcd63b47fda2052a583b1fbd1f
#include <stdio.h>
#define PI 3.1415926
int main() {
double a,v;
scanf("%lf",&a);
v=(4.0/3)*(a*a*a*PI);
printf("%.3lf",v);
return 0;
}
相关推荐