原题链接:
思维点:
4 / 3 与 4.0 / 3
ac代码:
#include<cstdio>
using namespace std;
const double PI = 3.1415927;
int main() {
double r;
while(scanf("%lf", &r)!=EOF) {
double v = 4.0 / 3 * PI * r * r * r;
printf("%.3lf\n", v);
}
return 0;
}
2023-11-17 09:38:10