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.h> double a[3]; void main() { while (1) { cin>>a[0]>>a[1]>>a[2]; if(a[0]==0&&a[1]==0&&a[2]==0) break; if(a[0]<=4.5) { if(a[1]>=300&&a[2]>=500) { cout<<"Wide Receiver"; cout<<" "<<"Lineman"; cout<<" "<<"Quarterback"<<" "<<endl; } else if(a[1]>=200&&a[2]>=300) { cout<<"Wide Receiver"; cout<<" "<<"Quarterback"<<" "<<endl; } else if(a[1]>=150&&a[2]>=200) { cout<<"Wide Receiver"<<" "<<endl; } else cout<<"No positions"<<endl; } else if(a[0]<=5.0) { if(a[1]>=300&&a[2]>=500) { cout<<"Lineman"; cout<<" "<<"Quarterback"<<" "<<endl; } else if(a[1]>=200&&a[2]>=300) cout<<"Quarterback"<<" "<<endl; else cout<<"No positions"<<endl; } else if(a[0]<=6.0) { if(a[1]>=300&&a[2]>=500) cout<<"Lineman"<<" "<<endl; else cout<<"No positions"<<endl; } } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator