Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:编译错误

Posted by 20091101579 at 2011-01-05 17:13:27 on Problem 1005
In Reply To:编译错误 Posted by:z286989429 at 2010-12-21 14:27:21
#include <cmath>
#include <iostream>
using namespace    std;

const double Pai = 3.14159265; 

int main()
{
    int i,N,Year;
    double X,Y,C,S;
    
    while(cin>>N)
    {
        for(i=1;i<=N;i++)
        {
            cin>>X>>Y;
            Year = 1;
            C = 50*Year;
            S = 0.5*Pai*(X*X+Y*Y);
            while(C < S)
            {
                Year++;
                C = 50*Year;
            }
            cout<<"Property "<<i<<": This property will begin eroding in year "<<Year<<"."<<endl;
        }
        cout<<"END OF OUTPUT."<<endl;
    }
    return 0;
}




Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator