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

怎么总是 WA 求解释!!!

Posted by quanspace at 2013-01-12 20:45:51 on Problem 1005
# 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:
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