c언어
#include<stdio.h>
int main(){
int N;
scanf("%d",&N);
for(int i=1;i<=N;i++){
for(int j=N-i-1;j>=0;j--){
printf(" ");
}
for(int j=1;j<=i;j++){
printf("*");
}
printf("\n");
}
return 0;
}
'알고리즘 > 백준' 카테고리의 다른 글
[백준_단계별로 풀어보기] while - 10951번 A+B-4 | c언어 (0) | 2022.01.07 |
---|---|
[백준_단계별로 풀어보기] while - 10952번 A+B-5 | c언어 (0) | 2022.01.07 |
[백준_단계별로 풀어보기] for - 11021번 A+B-7 | c언어 (0) | 2022.01.06 |
[백준_단계별로 풀어보기] for - 10950번 A+B-3 | c언어 (0) | 2022.01.06 |
[백준_단계별로 풀어보기] for - 2742번 A+B | c언어 (0) | 2022.01.06 |