| ||||||||||
| 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;
const double PI = 3.14;
int main()
{
int n; //n indicating how many data sets will be included
int index = 1;
float x_pos, y_pos;
int years[10];
cin>>n;
int i;
for( i = 0; i<n;i++)
{
cin>>x_pos>>y_pos;
years[i] = (int)(x_pos*x_pos + y_pos*y_pos)*PI/100 + 1 ;
}
for(i = 0;i<n;i++)
cout<<"Property "<<index++<<':'<<" This property will be eroding in year "<< years[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