3 条题解
-
0
求圆的面积和周长 题解
1)审题 已知一个圆的半径,求解该圆的面积和周长
pai
=3.1415926输入:
半径
输出:
面积
周长
2)代码
#include <bits/stdc++.h> using namespace std; int main() { double r; cin >> r; double pi= 3.1415926; cout << setprecision(2) << fixed << 1.0 * pi * r * r; cout << /n; cout << setprecision(2) << fixed << 1.0 * pi * 2 * r; return 0; }
点个赞吧 拜拜
- 1
信息
- ID
- 274
- 时间
- 1000ms
- 内存
- 16MiB
- 难度
- 6
- 标签
- 递交数
- 1521
- 已通过
- 410
- 上传者