北大acm1005

题目链接:http://poj.org/problem?id=1005

Source Code

Problem: 1005   User: yuanting0505
Memory: 252K   Time: 0MS
Language: C++   Result: Accepted
    • Source Code
#include <iostream>

#include <string>

using namespace std;



int main(int argc, const char * argv[])

{

    int account;

    cin>>account;

    float a,b;

    int  year;

    for(int i=0;i<account;i++)

    {

        cin>>a>>b;

        year=(a*a+b*b)*3.14/100+1;

        cout<<"Property "<<i+1<<": This property will begin eroding in year "<<year<<"."<<endl;

    }

    cout<<"END OF OUTPUT."<<endl;

    return 0;

}

你可能感兴趣的:(ACM)