POJ 1005

#include<iostream>
#include<cmath>
#define PI 3.1415926
using namespace std;
int main(){
	int n;
	cin>>n;
	float x,y,r,area;
	int year;
	for(int i=0;i<n;++i){
		cin>>x>>y;
		r=sqrt(pow(x,2)+pow(y,2));
		area=0.5*PI*pow(r,2);
		year=int(area/50);
		cout<<"Property "<<i+1<<": This property will begin eroding in year "<<year+1<<"."<<endl;
	}
	cout<<"END OF OUTPUT.";
	return 0;
}

猜你喜欢

转载自blog.csdn.net/chailyn_trista/article/details/80964195
今日推荐