#include <stdio.h>

int main() {
    int i, j;
    for(i=1;i<=3;i++){
        printf("%d번 줄: ", i);
        
        for(j=1;j<=10;j++){
            printf("%d ", j);
        }
        
        printf("\n");
    }

    //구구단
    for(i=2;i<=9;i++){ //2~9까지 반복
        for(j=1;j<=9;j++){ //1~9까지 반복
            printf("%d x %d = %d\n", i, j, i*j);
        }
        printf("\n");
    }

    //별찍기
    for(i=1;i<=5;i++){
        for(j=1;j<=i;j++){
            printf("*");
        }
        printf("\n");
    }

    //별찍기2
    for(i=5;i>=1;i--){
        for(j=1;j<=i;j++){
            printf("*");
        }
        printf("\n");
    }

    //별찍기3
    for(i=1;i<=5;i++){
        for(j=i;j<5;j++){
            printf(" ");
        }

        for(j=1;j<=i;j++){
            printf("*");
        }
        printf("\n");
    }


    
    
}

Embed on website

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