POJ 1005 I Think I Need a Houseboat 水题

水题一道

//POJ 1005
#include <iostream>
#include <cmath>
using namespace std;

int main()
{
    int caseNum;
    float x, y;
    int n;
    cin >> caseNum;
    for (int i = 1; i <= caseNum; i++)
    {
        cin >> x >> y;
        n = ceil((x*x+y*y)*3.1415/100);
        cout << "Property "<<i<<": This property will begin eroding in year "<<n<<"."<< endl;
    }
    cout << "END OF OUTPUT." <<endl;
//    system("pause");
    return 0;
}

posted on 2012-05-26 16:16  澄哥  阅读(227)  评论(0编辑  收藏  举报

导航