#include <stdio.h>

int main() {
    int a = 20;
    printf("%d\n", ++a);
    printf("%d\n", a++);
    printf("%d\n", a);

    //for문
    // for(선언; 조건; 증감){
    //     반복 시킬 명령어
    // }

    for(int i=1;i<=10;i++){
        printf("hello %d\n", i);
    }

    for(int i=10;i>=1;i--){
        printf("hello %d\n", i);
    }

    //N을 입력받은 뒤, 구구단 N단을 출력하는 프로그램을 작성하시오.
    int n;
    scanf("%d", &n);

    for(int i=1; i<10; i++){
        printf("%d x %d = %d\n", n, i, n*i);
    }
    
}

Embed on website

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