思路:用pow函数,定义pi
#include <stdio.h>#include <stdlib.h>#include"math.h"#define PI 3.1415927
int main(){ double r,c; while(scanf("%lf",&r)!=EOF) { c=pow(r,3); c=4*PI*c/3; printf("%.3lf ",c); }
return 0;}