| ||||||||||
| 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()
{
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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator