1 条题解
-
0
C :
#include<stdio.h> #define PI 3.1415926 void main() { double r; scanf("%lf",&r); printf("%.2f\n",PI*r*r); printf("%.2f\n",2*PI*r); }
C++ :
#include<iostream> using namespace std; const float pi(3.1415926); int main() { float r,s,c; cin>>r; s=pi*r*r; c=2*pi*r; cout.precision(2); cout.setf(ios::fixed); cout<<s<<endl; cout<<c<<endl; //system("pause"); return 0; }
- 1
信息
- ID
- 1058
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者