还是水题。。
题目意思说白了就是让你求半圆的面积。
#include<stdio.h>
#include<iostream>
#include<math.h>
using namespace std;
#define pi 3.14159
int main(){
int T;
cin>>T;
double x,y;
int i=1;
while(T--){
cin>>x>>y;
double ara=(x*x+y*y)*pi/2;
cout<<"Property "<<i++<<": This property will begin eroding in year "<<(int)ara/50+1<<"."<<endl;
}
cout<<"END OF OUTPUT."<<endl;
return 0;
}
本文介绍了一个简单的C++程序,用于计算给定半径的半圆面积,并根据特定公式输出处理结果。程序使用标准输入输出流并引入数学库进行面积计算。
1138

被折叠的 条评论
为什么被折叠?



