POJ2070 Filling Out the Team
来源:互联网 发布:武汉淘宝外包 编辑:程序博客网 时间:2024/06/05 00:50
老套的题,想要把代码写的非常简单还得花很多功夫,我是利用了flag变量作为标志来进行判断的,实际上也是写了很多的代码 - -
很简单吧,没啥值得一提的,附代码
#include <iostream>using namespace std;int main(){ int we,st; float sp; while(cin>>sp>>we>>st&&sp*we*st!=0){ int flag1=0,flag2=0,flag3=0; if(sp<=4.5&&we>=150&&st>=200) flag1=1; if(sp<=6.0&&we>=300&&st>=500) flag2=1; if(sp<=5.0&&we>=200&&st>=300) flag3=1; if(flag1){ if(flag2){ if(flag3){ cout<<"Wide Receiver Lineman Quarterback"<<endl; } else cout<<"Wide Receiver Lineman"<<endl; } else{ if(flag3){ cout<<"Wide Receiver Quarterback"<<endl; } else cout<<"Wide Receiver"<<endl; } } else{ if(flag2){ if(flag3){ cout<<"Lineman Quarterback"<<endl; } else cout<<"Lineman"<<endl; } else{ if(flag3){ cout<<"Quarterback"<<endl; } else cout<<"No positions"<<endl; } } } return 0;}
0 0
- poj2070 Filling Out the Team
- POJ2070 Filling Out the Team
- POJ2070浅析------Filling Out the Team
- zoj2321 Filling Out the Team
- zoj 2321 Filling Out the Team
- zoj2321 Filling Out the Team水题
- ZOJ 2321 Filling Out the Team
- zoj 2321 Filling Out the Team
- poj 2070 Filling Out the Team
- HOJ 1746 Filling Out the Team
- ZOJ 2321 Filling Out the Team
- poj 2070 Filling Out the Team
- POJ 2070 Filling Out the Team(水题)
- TOJ 1825.Filling Out the Team
- POJ 2070 Filling Out the Team G++
- POJ 2070 Filling Out the Team(水~)
- POJ 2070 Filling Out the Team(我的水题之路——double比较)
- poj2070
- c语言程序设计流程图详解
- Get Jenkins job build queue length
- android 第一个界面 选项卡加toolbar
- Anddroid 物流查询快递查询
- 欢迎使用CSDN-markdown编辑器
- POJ2070 Filling Out the Team
- NameNode 高可用整体架构概述
- Mac OS X上安装和使用Homebrew和Homebrew Cask来进行软件安装管理
- Android基础_SharedPreferences
- iOS开发罗盘/指南针
- g++参数简介
- JDBCUtils工具类
- 城市选择二级联动、三级联动的思路
- RK3288做DNS,让公司告别shit花生壳,DNSPOD使用方法