#include <stdio.h>

int main() {
    int age;
    age = 12;
    printf("hello %d\n", age);

    float a;
    a = 0.3465;
    printf("%.2f\n", a); //소수점 둘째자리까지
    printf("%.2lf\n", a); //소수점 셋째자리에서 반올림

    /*
        주석 두 줄 이상일 때
    */

    const int year = 2015; //상수: 변하지 않는 수

    int num1 = 20, num2 = 10;
    printf("%d\n", num1+num2);
    printf("두 수의 차는 %d입니다.\n", num1-num2);
    printf("%d x %d = %d\n", num1, num2, num1*num2);
    
    int input;
    scanf("%d", &input);

    int one, two, three;
    scanf("%d %d %d", &one, &two, &three);
    printf("첫 번째 값: %d\n", one);
    printf("두 번째 값: %d\n", two);
    printf("세 번째 값: %d\n", three);
    
    
    
    
    return 0;
}

Embed on website

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