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

大家帮忙看看哪里错了,给提个醒,谢谢了。

Posted by freester at 2006-11-24 22:35:06 on Problem 1005
#include<iostream>
#include<cmath>
using namespace std;

int main()
{
    const int lose = 100;
    const double pi = 3.141;
    int n, i;
    double x, y, r;
    cin>>n;
    int *year = new int[n];
    for(i=0; i<n ; i++)
    {
             cin>>x>>y;
             r = x*x + y*y;
             year[n] = (pi * r) / lose;
    }
    for(i=1; i<=n ; i++)
    {
             cout<<"Property "<<i<<": This property will begin eroding int year "<<year[i]+1<<"."<<endl;
    }
    delete [] year;
    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