#include <stdio.h>

int main() {
    /* if문
    if (조건식) {
        조건이 참일 때 실행할 코드;
    }
    */
    int n1 = 5;
    if (n1 > 0) {
        printf("0보다 큽니다\n");
    }

    /*if-else문
    if (조건식) {
        조건이 참일 때 실행할 코드;
    } else {
        조건이 거짓일 때 실행할 코드;
    }
    */
    int n2;
    scanf("%d", &n2);
    printf("%d\n", n2);

    if (n2 % 2 == 1) {
        printf("홀수\n");
    } else {
        printf("짝수\n");
    }


    printf("-----문제----\n");
    int score = 100;
    if (score >= 65 && score <= 100) {
        printf("합격\n");
    } else {
        printf("불합격\n");
    }

    return 0;
}

Embed on website

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