您的位置:首页 > 其它

poj2070 Filling Out the Team

2013-07-12 13:44 363 查看
读懂题,基本就AC了~~~具体代码如下:
#include<stdio.h>#include<stdlib.h>#include<math.h>int main(){double a;int b,c;int temp1,temp2,temp3;while(~scanf("%lf %d %d",&a,&b,&c)&&a&&b&&c){temp1 = 0;temp2 = 0;temp3 = 0;if(a<=4.5&&b>=150&&c>=200) {printf("Wide Receiver ");temp1 = 1;}if(a<=6.0&&b>=300&&c>=500) {printf("Lineman ");temp2 = 1;}if(a<=5.0&&b>=200&&c>=300) {printf("Quarterback ");temp3 = 1;}if((!temp1)&&(!temp2)&&(!temp3))printf("No positions");printf("\n");}return 0;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: