| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
各位帮忙下,谢谢了。为什么我在这里是compiler error#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator