#include <stdio.h>

int main() {
    //변수 : 변하는 수
    int age = 12;
    printf("나이는 %d\n", age);
    age = 13;
    printf("나이는 %d\n", age);
    //변수에 저장된 값은 바꿀 수 있다

    //상수 : 변하지 않는 수
    //const 자료형 변수이름 = 값;
    const int YEAR = 2014;
    printf("%d\n", YEAR);
    //YEAR = 2025; 수정이 불가능하다

    printf("----문제1----\n");
    int apple = 7; 
    printf("사과는 %d개입니다\n", apple);
    apple = 3; 
    printf("사과는 %d개입니다\n", apple);

    return 0;
}

Embed on website

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