#include <stdio.h>

int main() {
    /* if - else if - else 문
    if (조건1) {
        코드1;
    } else if (조건2) {
        코드2;
    } else if (조건3) {
        코드3;
    } else {
        위의 조건이 모두 거짓일 때 실행할 코드;
    } */

    int score = 50;
    if (score >= 90) {
        printf("A");
    } else if (score >= 80) {
        printf("B");
    } else if (score >= 70) {
        printf("C");
    } else {
        printf("F");
    }

    printf("\n");

    printf("----문제----\n");
    int age = 5;
        int age = 5;
    if (age >= 8 && age < 14) {
        printf("초등학생");
    } else if (age >= 14 && age < 17) {
        printf("중학생");
    } else if (age >= 17 && age < 20) {
        printf("고등학생");
    } else if (age >= 20) {
        printf("성인");
    }






    
    


    

    
    return 0;
}

Embed on website

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