#include <stdio.h>


int main() {
    //상수
    const int YEAR = 2000; //변수 만드는거 앞에 const 붙임
    printf("태어난 년도 : %d\n", YEAR);
    //YEAR = 2000; 오류: 읽기 전용 변수 'YEAR'에 값을 할당하려 했습니다.

    //printf
    //연산
    int add = 3 + 7; //10
    printf("3 + 7 = %d\n", add);
    printf("%d + %d = %d\n", 3, 7, 3+7);

    //scanf
    //키보드 입력을 받아서 저장
    int input;
    printf("값을 입력하세요 : ");
    scanf("%d", &input); //&의미 : 어느 자리에 입력받을지 자세한 내용은 포인터에서 배움
    printf("입력값 : %d\n", input);


    


    
    return 0;
}

Embed on website

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