标签:
1 #include <iostream> 2 using namespace std; 3 const double pi = 3.1415926535; 4 5 int main() 6 { 7 int t,time = 0;; 8 double x,y; 9 cin >> t; 10 while(t--) 11 { 12 ++time; 13 cin >> x >> y; 14 double area = pi*(x*x + y*y); 15 int res = (int)(area/100.0) + 1; 16 cout<<"Property "<<time<<": This property will begin eroding in year "<<res<<‘.‘<<endl; 17 } 18 cout<<"END OF OUTPUT."<<endl; 19 return 0; 20 }
poj 1005 I Think I Need a Houseboat
标签:
原文地址:http://www.cnblogs.com/guoyongheng/p/5721826.html