몸무게에 따라서 체급 출력하는 문제 푸는중인데 왜 결과가 이상하게 뜨는지 모르겠어요


#include <stdio.h>      

int main()

{

double num;


scanf("%f", &num);


if (num > 88.45)

printf("Heavyweight");

else if ((88.45 >= num) && (num > 72.57))

printf("Cruiserweight");

else if ((72.57 >= num) && (num > 61.23))

printf("Middleweight");

else if ((61.23 >= num) && (num > 50.80))

printf("Lightweight");

else

    printf("Flyweight");


return 0;

}

이렇게 짰는데 입력값 상관없이 Flyweight로 출력되더라고요 왜그러는지 이유 아시는분 ㅠㅠ


정답코드는 이거

#include <stdio.h>      

int main() 

float weight; 


scanf("%f", &weight); 


if (weight <= 50.80) 

printf("Flyweight"); 

else if (weight <= 61.23) 

printf("Lightweight"); 

else if (weight <= 72.57)

printf("Middleweight"); 

else if (weight <= 88.45)

printf("Cruiserweight");

else

printf("Heavyweight"); 


return 0;

}