- 점수를 입력받아 등급을 출력하는 프로그램을 작성(switch문 이용)
* 점수는 0~100점까지만 입력 가능하며, 그 외의 점수를 입력하면 “잘못된 입력”
이라는 메시지 출력 후 종료
* 90점 이상 : A등급
* 80점 이상 : B등급
* 70점 이상 : C등급
* 60점 이상 : D등급
* 60점 미만 : F등급

이게문제고

#include <stdio.h>

        int main(void)

        {

               int num;

               int result;

               printf("점수입력: ");

               scanf("%d", &num);

<o:p> </o:p>

               result = num / 10;

              

               if(num>100, 0>num)

                       printf("잘못된입력(0~100)사이입력n");             

               else

<o:p>               switch(result)                                                                     

               {

               case 10:

               case 9:

                       printf("%d==> A등급", num);

                       break;

               case 8:

                       printf("%d==> B등급", num);

                       break;

               case 7:

                       printf("%d==> C등급", num);

                       break;

               case 6:

                       printf("%d==> D등급", num);

                       break;

               default:

                       printf("%d==> F등급", num);

                      

              }
               return 0;

        }

이렇게 해서 풀긴 풀었는데
스위치문으로만 똑같이 결과가 나오게하려면 case5,4,3,2,1 이렇게해서 일일이 다해야되는거야??