#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
const double pi = 3.14159;
double r, c, s;
cin >> r;
c = 2.0*pi*r;
s = pi * r*r;
cout << setiosflags(ios::scientific) << c << endl;
cout << s << endl;
cout << setiosflags(ios::fixed) << c;
cout << s << endl;
system("pause");
return 0;
}
分别用指数形式和小数两种格式输出
最新推荐文章于 2022-08-10 21:26:43 发布