题目描述
当半径为 ,请输出圆的周长、面积和球体积。取 。请直接使用 cout
输出答案,每行一个数字。
输入格式
不需要输入。
输出格式
请直接使用 cout
输出答案,每行一个数字。一共三个数字。
题目分析
目的:求出圆的周长、面积和球体积。
- 圆的周长:
- 圆的面积:
- 球的体积:
代码实现
#include <bits/stdc++.h>
using namespace std;
const double PI=3.141593;
const int r=5;
int main()
{
cout<<2*PI*r<<endl;
cout<<PI*r*r<<endl;
cout<<4/3.0*PI*r*r*r;
return 0;
}