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 |
Re:为何WA???呜呼-----In Reply To:Re:为何WA???呜呼----- Posted by:904013041 at 2005-01-03 11:11:08 #include <stdio.h> #include <iostream.h> void 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; } cout<<" "<<endl; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator