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 |
给大家分享一下!!Source Code Problem: 2070 User: smm595788087 Memory: 220K Time: 0MS Language: C++ Result: Accepted Source Code #include <iostream> using namespace std; int main(){ //ifstream cin("aaa.txt"); double speed ,weight , strength ; while(cin>>speed>>weight>>strength){ if(speed==0 && weight==0 && strength==0) break; int tag=0; if(speed<=4.5 && weight>=150 && strength>=200) tag += 1; if(speed<=5.0 && weight>=200 && strength>=300) tag += 2; if(speed<=6.0 && weight>=300 && strength>=500) tag += 4; switch(tag){ case 0:cout<<"No positions"<<endl; break; case 1:cout<<"Wide Receiver"<<endl; break; case 2:cout<<"Quarterback"<<endl; break; case 4:cout<<"Lineman"<<endl; break; case 3:cout<<"Wide Receiver Quarterback"<<endl; break; case 6:cout<<"Lineman Quarterback"<<endl; break; case 7:cout<<"Wide Receiver Lineman Quarterback"<<endl; break; } } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator