//计算圆的直径,周长,面积
#include <iostream>
using namespace std;
int main()
{
float r;
float pi = 3.14159;
cout << "请输入圆的半径(R):";
cin >> r;
float zj = 2 * r;
float zc = 2 * pi * r;
float mj = pi * r * r;
cout << "圆的直径为:";
printf("%.4f ", zj);
cout << endl;
cout << "圆的周长为:";
printf("%.4f", zc);
cout << endl;
cout << "圆的面积为:";
printf("%.4f", mj);
cout << endl;
}
© 版权声明
THE END
暂无评论内容