总时间限制:
对于半径为r的球,其体积的计算公式为V=4/3*πr3,这里取π= 3.14。
现给定r,求V。
4
267.95
1 #include<iostream> 2 #include <math.h> 3 using namespace std; 4 5 int main(){ 6 7 double r=0,v=0,pai=3.14; 8 cin>>r; 9 v=(4.0/3.0)*pai*pow(r,3); 10 11 printf("%.2f",v); 12 13 return 0; 14 }
原文:https://www.cnblogs.com/geyang/p/12327349.html