【题目描述】
输入半径r,输出圆的直径、周长、面积,数与数之间以一个空格分开,每个数保留小数点后4位。
【输入】
输入半径。
【输出】
如题述。数与数之间以一个空格分开。
【输入样例】
1.0
【输出样例】
2.0000 6.2832 3.1416
【参考代码】
# include<bits/stdc++.h>
using namespace std;
const double PI=3.1415926;
int main()
{
float r,d,c,s;
cin>>r;
d = r*2;
c = d * PI;
s = r*r*PI;
printf("%0.4f %0.4f %0.4f",d,c,s);
return 0;
}