#include <stdio.h>
int main() {
int a = 3; //선언과 초기화
a = 5;
printf("%d\n", a);
float b = 3.2;
printf("%.2f\n", b);
const int c = 5; //상수: 변하지 않는 수
printf("%d\n", c);
//한줄만 쓸 때
/*
주석 쓰기
두 줄 이상일 때
*/
printf("hello world!\n");
printf("%d\n", a+c);
printf("%d %f %d\n", a, b, c);
printf("%d + %d = %d\n", a, c, a+c);
printf("%d와 %d의 합은 %d입니다.", a, c, a+c);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: