2 条题解
-
012234洪子昊 (12234洪子昊) LV 8 @ 2021-11-08 21:24:48
#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
int main()
{
double r,pi=3.14159;
cin>>r;
cout<<fixed<<setprecision(4)<<2*r<<' ';
cout<<fixed<<setprecision(4)<<2*pi*r<<' ';
cout<<fixed<<setprecision(4)<<pi*r*r<<' ';
return 0;
} -
-22021-11-21 21:29:53@
#include <iomanip>
#include <iostream>
using namespace std;
int main()
{
double r,d,c,s,pi=3.14159;
cin>>r;
d=2*r;
c=2*pi*r;
s=pi*r*r;
cout<<fixed<<setprecision(4)<<d<<' ';
cout<<fixed<<setprecision(4)<<c<<' ';
cout<<fixed<<setprecision(4)<<s;
return 0;
}
- 1
信息
- ID
- 2318
- 难度
- 1
- 分类
- (无)
- 标签
- 递交数
- 126
- 已通过
- 99
- 通过率
- 79%
- 被复制
- 2
- 上传者