zoj 2321
来源:互联网 发布:淘宝嘉年华和双11 编辑:程序博客网 时间:2024/06/05 09:19
//2593353 2011-07-23 15:13:49 Accepted 2321 C 0 160 ylwh!#include <stdio.h>#define w "Wide Receiver"#define l "Lineman"#define q "Quarterback"#define n "No positions"float spe, wei, str, yes;int fun(float x, float y, float z, char s[]){ if(spe<=x && wei>=y && str>=z) { if(yes) printf(" "); printf("%s", s); return 1; } return 0;}int main(){ while(scanf("%f%f%f", &spe, &wei, &str) && spe!=0) { yes = 0; yes += fun(4.5, 150, 200, w); yes += fun(6.0, 300, 500, l); yes += fun(5.0, 200, 300, q); if(!yes) printf("%s", n); printf("\n"); } return 0;}