2146: 【例7.2】与圆相关的计算

include <bits/stdc++.h>

using namespace std;
double r, pi=3.14159;
int main()
{
cin >> r;
cout << fixed << setprecision(4) << r2 << " ";
cout << fixed << setprecision(4) << r
2pi << " ";
cout << fixed << setprecision(4) << pi
r*r;
}

反思:错误点:double 使用错误



posted @ 2024-10-12 21:30  浩瀚宇宙星晨  阅读(4)  评论(0编辑  收藏  举报