计算球体积

#include <iostream>
#include <cstdio>
#include <cmath>
#define PI 3.1415927
using namespace std;

int main()
{
	double r;
	while(~scanf("%lf", &r))
	{
		printf("%.3f
", 4.0/3.0*PI*r*r*r);
	}
	
	return 0;
}

  

原文地址:https://www.cnblogs.com/mjn1/p/11231982.html