9/27

kimseunghoo · September 27, 2025
#include <stdio.h>

int main() {
    // &&
    // ||
    // !
    int i;
    i=10;
    //if~else문
    if(i<10){
        printf("10보다 작습니다.");
    }else{
        printf("10보다 크거나 같습니다.");
    }

    //if ~ else if ~ else
    int age = 12;
    if(age<=13){
        printf("초등학생입니다.");
    }else if(age>13 && age<17){
        printf("중학생입니다.");
    }else if(age>16&&age<20){
       printf("고등학교입니다.");
    }else{
        printf("성인입니다.");
    }


      





    
    
}
Output

Comments

Please sign up or log in to contribute to the discussion.