ZOJ Problem Set - 1049

ZOJ Problem Set - 1049

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=49

 

没什么好说的。

 

#include <iostream>

using namespace std;

int main()
{
    int loop, count = 1;
    float x,y;
    int year;
    cin >> loop;
    for(;0 < loop;loop--) {
        cin >> x >> y;
        year = (x*x + y*y) * 0.0314 + 1;
        cout << "Property " << count++
             << ": This property will begin eroding in year " << year
             << "." << endl;
    }
    cout << "END OF OUTPUT." << endl;
    return 0;
}

 

你可能感兴趣的:(ZOJ Problem Set - 1049)