#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 = 2015; 수정이 불가능하다
printf("----문제1----\n");
int apple = 7;
printf("사과는 %d개입니다\n", apple);
apple = 3;
printf("사과는 %d개입니다\n", apple);
printf("----문제2----\n");
const int BIRTH_YEAR = 2014;
printf("태어난 연도는 %d년입니다\n", BIRTH_YEAR);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: