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 chenmh at 2008-08-21 17:42:49 on Problem 2070
#include <iostream>
using namespace std;
int main()
{
	float sp;
	int w,s;
	cin>>sp>>w>>s;
	while(sp!=0 && w!=0 && s!=0){
		if(sp<=4.5)
        {
			if(w>=150 && s<200 || w<150 && s>=200 && w<150 && s<200)
				cout<<"No positions"<<endl;
			if(w>=150 && w<200 && s>=200 || w>=200 && s>=200 && s<300)
				cout<<"Wide Receiver"<<endl;
			if(w>=200 && w<300 && s>=300 || w>=300 && s>=300 && s<500)
				cout<<"Wide Receiver"<<" "<<"Quarterback"<<endl;
			if(w>=300 && s>=500)
				cout<<"Wide Receiver"<<" "<<"Quarterback "<<"Lineman"<<endl;
		}
		else{
			if(s<=5.0){
				if(w>=200 && s<300 || w<200 && s>=300 || w<200 && s<300)
					cout<<"No positions"<<endl;
				if(w>=200 && w<300 && s>=300 || w>=300 && s>=300 && s<500)
					cout<<"Quarterback"<<endl;
				if(w>=300 && s>=500)
					cout<<"Quarterback"<<"Lineman"<<endl;
			}
			else{
				if(sp<=6.0)
                {
					if(w>=300 && s<500 || w<300 && s>=500 || w<300 && s<500)
						cout<<"No positions"<<endl;
					if(w>=300 && s>=500)
						cout<<"Lineman"<<endl;
				}
				else
					cout<<"No positions"<<endl;
			}
		}
		cin>>sp>>w>>s;
	}
	system("pause");
	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