| ||||||||||
| 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 | |||||||||
例子运行的也对,但为什么都是WA?#include<iostream>
using namespace std;
int main()
{
int N,i,j;
cin>>N;
float x[50],y[50],s;
for(i=0;i<N;i++)
{
cin>>x[i]>>y[i];
}
for(i=0;i<N;i++)
{
s=0.0;
j=0;
while((x[i]*x[i]+y[i]*y[i])*3.14>2*s)
{
s=s+50;
j++;
}
cout<<"Property "<<i+1<<": This property will begin eroding in year "<< j<<"."<<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