[c언어](연습문제) 입력된 평점에 따라 등급을 출력하는 프로그램

|



입력된 평점에 대해 다음과 같은 등급을 출력하는 프로그램을 작성하시오.
              평점              등급 
 4.0이상  A
 3.0이상 4.0미만  B
 2.0이상 3.0미만  C
 1.0이상 2.0미만  D
 1.0미만  F

#include <stdio.h>
void main()
{
    double n;
    printf("평점을 입력>>");
    scanf("%lf", &n);
    if(n>=4)
        printf("A등급");
    else if(n>=3)
        printf("B등급");
    else if(n>=2)
        printf("C등급");
    else if(n>=1)
        printf("D등급");
    else
        printf("F등급");
}

# 실행 결과


  ::