#include <stdio.h>

int main() {
    int age = 10;
    if (age >= 8){
        printf("초등학생입니다.\n");
    }else{
        printf("유치원생입니다.\n");
    }

    if (age >= 8 && age <= 13){
        printf("초등학생입니다.\n");
    }else if(age >= 14 && age <= 16){
        printf("중학생입니다.\n");
    }else if(age >= 17 && age <= 19){
        printf("고등학생입니다.\n");
    }else{
        printf("성인입니다.\n");
    }

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

    //break문
    for(int i=0; i<10; i++){
        if (i == 3){
            break;
        }
        printf("%d\n", i);
    }

    //continue문
    for(int i=0; i<10; i++){
        if (i >= 3 && i <= 5){
            continue;
        }
        printf("%d\n", i);
    }

    int n = 3;
    switch(n){
        case 1:
            printf("n은 1입니다\n");
            break;
        case 2:
            printf("n은 2입니다\n");
            break;
        default:
            printf("n이 무엇인지 모릅니다.\n");
            break;
    }

    int num = 82;
    switch(num/10){
        case 10:
            printf("100점입니다\n");
            break;
        case 9:
             printf("90점대입니다\n");
            break;
        case 8:
             printf("80점대입니다\n");
            break;
        case 7:
             printf("70점대입니다\n");
            break;
    }
    
}

Embed on website

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