代码如下:
1 #include <iostream>
2 #include <iomanip>
3 using namespace std;
4 int main()
5 {
6 double d=0.3,pi=3.14,s;
7 s=2*pi*(d/2)*(d/2);
8 cout<<fixed<<setprecision(5)<<s<<endl;
9 return 0;
10 }
标签:std,main,include,cout,int,面积,C++,pi,半球
来源: https://www.cnblogs.com/stary-pointer/p/13635770.html