์ƒ์„ธ ์ปจํ…์ธ 

๋ณธ๋ฌธ ์ œ๋ชฉ

[๋ฐฑ์ค€(BOJ)] 2439๋ฒˆ: ๋ณ„ ์ฐ๊ธฐ - 2 (์ž…์ถœ๋ ฅ, C++)

PROGRAMMING/Algorithm

by koharin 2021. 2. 11. 13:24

๋ณธ๋ฌธ

728x90
๋ฐ˜์‘ํ˜•

๐Ÿ’ป C++ ์ œ์ถœ์ฝ”๋“œ


#include <stdio.h>
int main(){
    int N;
    scanf("%d", &N);
    for(int i=0; i<N; i++){
        for(int m=0; m<N-i-1; m++) printf(" ");
        for(int n=0; n<i+1; n++) printf("*");
        printf("\n");
    }
}

 

 

๐Ÿ‘ ๊ฒฐ๊ณผ


728x90
๋ฐ˜์‘ํ˜•

๊ด€๋ จ๊ธ€ ๋”๋ณด๊ธฐ