#include <stdio.h>

int main() {
    float kor,math,eng;
    float avg;
    scanf("%f %f %f", &kor, &math, &eng);
    avg=(kor+math+eng)/3;

    if(avg>=90){
        printf("A");
    }
    else if(avg>=80){
        printf("B");
    }
    else if(avg>=70){
        printf("C");
    }
    else if(avg>=50){
        printf("D");
    }
    else{
        printf("F");
    }
    return 0;
}

// # case1
// if(avg>=100){
//     코드
// }

// # case2
// if(avg>=100){
//     코드1
// }else{
//     코드2
// }

// # case3
// if(avg>=100){
//     코드1
// } else if(avg>=90){
//     코드2
// } else if(avg>=80){
//     코드3
// } else {
//     코드4
// }

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: