#include <stdio.h>

int main() {
    int age; //변수 선언
    age = 13; //변수 초기화
    age = 15;

    int age2 = 14; //변수의 선언과 초기화
    printf("%d\n", age);

    /*
        int %d
        float %f
        double %f 
        char %c %s
    */    

    //실수형 변수
    float f = 3.14;
    printf("%.2f\n", f);

    //상수 - 변하지 않는 수
    const int year = 2026;

    int add = 3 + 7;
    printf("3 x 7 = %d\n", add);
    printf("%d %d %d\n", 3, 2+5, add);

    //입력받는 함수
    int in;
    scanf("%d", &in);
    printf("입력 값: %d\n", in);

    int one, two, three;
    scanf("%d %d %d", &one, &two, &three);
    printf("%d %d %d\n", one, two, three);

    int a,b;
    scanf("%d %d", &a, &b);
    printf("%d\n", a+b);
    
}

Embed on website

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