http://acm.hit.edu.cn/hoj/problem/view?id=1746
计算此人可以胜任的位置
#include <stdio.h>
int main()
{
double speed, weight, strength;
bool flag;
while (scanf("%lf %lf %lf", &speed, &weight, &strength) != EOF)
{
flag = 0;
if ( speed == 0 && weight == 0 && strength == 0 )
break;
if ( speed <= 4.5 && weight >= 150 && strength >= 200)
{
printf("Wide Receiver ");
flag = 1;
}
if ( speed <= 6.0 && weight >= 300 && strength >= 500)
{
printf("Lineman ");
flag = 1;
}
if ( speed <= 5.0 && weight >= 200 && strength >= 300)
{
printf("Quarterback ");
flag = 1;
}
if (flag == 1)
printf("\n");
else
printf("No positions\n");
}
return 0;
}