4758
#include <stdio.h>
int main(void){
// 팀의 포지션 배열
float position_arr[3][3] = {
{4.5,150,200},
{6.0,300,500},
{5.0,200,300}};
// 포지션 정하기
float speed = -1, weight = -1, strength = -1;
while(1){
// 속도, 무게, 힘 입력 받기
scanf("%f %f %f", &speed, &weight, &strength);
// 만약 전부 0 0 0 이면 중단
if((speed == 0) && (weight == 0) && (strength == 0)){
break;
}
// 포지션 정하기
int is_positions = 0;
for(int i = 0; i < 3; i++){
if((speed <= position_arr[i][0]) && // 가장 느린 속도보다 작거나 같을 때
(weight >= position_arr[i][1]) && // 무게의 최소값보다 크거나 같을 때
(strength >= position_arr[i][2])){ // 힘의 최소값보다 크거나 같을 때 를 모두 만족할 경우
is_positions = 1; // 포지션이 있음을 의미
// 포지션 출력
switch (i)
{
case 0:
printf("Wide Receiver\n");
continue;
case 1:
printf("Lineman\n");
continue;
case 2:
printf("Quarterback\n");
continue;
}
}
}
// 포지션이 없을 경우 출력
if(!is_positions){
printf("No positions\n");
}
}
return 0;
}