#include <stdio.h>

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

    // if-else문
    // if (조건식) {
    //     조건이 참일 때 실행하는 코드;
    // } else {
    //     조건이 거짓일 때 실행하는 코드;
    // }
    int n2;
    printf("숫자를 입력하세요: ");
    scanf("%d", &n2);
    printf("%d\n", n2);

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


    printf("----문제1----\n");
    int score = 100;
    if (score >= 65 && score <= 100) {
        printf("합격\n");
    } else {
        printf("불합격\n");
    }
    
    printf("----숙제----\n");
    int num;
    scanf("%d", &num);

    if (num % 7 == 0) {
        printf("multiple\n");
    } else {
        printf("not multiple\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: