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

各位帮忙下,谢谢了。为什么我在这里是compiler error

Posted by tmactive at 2009-09-11 12:05:51 on Problem 1005
#include <iostream>
#include <cmath>
using namespace std;
const double PI=3.1415926;
int main()
{
double data[100][2];
double n;
cin>>n;
for(int i=0;i<n;i++)
{
cin>>data[i][0]>>data[i][1];
}
int year[100];
for(i=0;i<n;i++)
{
	int temp=1;
	double area;
	double b;
	b=data[i][0]*data[i][0]+data[i][1]*data[i][1];
	area=PI*b*0.5;
	while(50*temp<area)
	{
		++temp;
	}
	year[i]=temp;
}
for(i=0;i<n;i++)
{
cout<<"Property "<<i<<"?: This property will begin eroding in year "<<year[i]<<"."<<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