POJ - 1005

 1 #include<iostream>
 2 using namespace std;
 3 int main(){
 4     int n;
 5     double x, y;
 6     const double PI = 3.1415926535898;
 7     cin >> n;
 8     for (int i = 1; i <= n; i++){
 9         cin >> x >> y;
10         double sum = PI * (x*x + y*y) / 2;
11         cout << "Property " << i << ": This property will begin eroding in year " << (int)(sum / 50.0) + 1 << "." << endl;
12     }
13     cout << "END OF OUTPUT." << endl;
14     return 0;
15 }

 

 

爱数据:http://www.ai-data.com/

posted @ 2013-10-19 19:03  Acmen  阅读(201)  评论(0编辑  收藏  举报