9 条题解
- 1
信息
- ID
- 889
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 3
- 标签
- 递交数
- 331
- 已通过
- 189
- 上传者
#include<bits/stdc++.h>
using namespace std;
int main()
{
double w,h,l,a;
cin >> w;
if(w == w)
{
h=2*w;
l=h*3.14159;
a=w*w * 3.14159;
printf("%.4f %.4f %.4f",h,l,a);
}
}
#include #include #include using namespace std; int main() { double a,b,c,d; cin>>a; b=2.0a; c=2a3.14159; d=aa*3.14159; cout<<fixed<<setprecision(4)<<b<<" "; cout<<fixed<<setprecision(4)<<c<<" "; cout<<fixed<<setprecision(4)<<d; return 0; } 挺简单的
#include #include #include using namespace std; int main() { double n,z,c,s; cin>>n; z=2.0n; c=2n3.14159; s=nn*3.14159; cout<<fixed<<setprecision(4)<<z<<" "; cout<<fixed<<setprecision(4)<<c<<" "; cout<<fixed<<setprecision(4)<<s;
return 0;
}
#include<bits/stdc++.h> using namespace std; int main(){ double r; cin>>r; double d,c,s; d=2r; c=23.14159r; s=3.14159pow(r,2); printf("%.4lf %.4lf %.4lf",d,c,s); return 0; }
#include #include #include<math.h> using namespace std; int main(){ double r,d,c,s; cin>>r; d=r2; c=d3.14159; s=rr3.14159; cout<<fixed<<setprecision(4)<<d<<" "; cout<<fixed<<setprecision(4)<<c<<" "; cout<<fixed<<setprecision(4)<<s; }