zoj2321 Filling Out the Team水题

来源:互联网 发布:火烧白宫 知乎 编辑:程序博客网 时间:2024/05/16 01:49

估计是,今天的水题都让我碰上了,那我就好好享受一次AC,哈哈大笑

#include<stdio.h>int main(){    int t;    double spe,wei,str;    while(scanf("%lf%lf%lf",&spe,&wei,&str))    {       if(spe==0.0&&wei==0.0&&str==0.0)        break;      else      {           t=1;       if(spe<=4.5)         if(wei>=150)           if(str>=200)           {             printf("Wide Receiver");             t++;           }       if(spe<=6.0)         if(wei>=300)           if(str>=500)           {             if(t==2)               printf(" Lineman");             else               printf("Lineman");               t++;           }           if(spe<=5.0)         if(wei>=200)           if(str>=300)           {             if(t!=1)               printf(" Quarterback");             else               printf("Quarterback");               t++;           }       if(t==1)         printf("No positions\n");       else                  printf("\n");        }           }    return 0;}                        


 

原创粉丝点击