VioletaBabel
2442번: 별찍기 - 5 본문
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #include<cstdio> int main() { int n, sp, st = 1; scanf("%d", &n); sp = n - 1; while (n--) { for (int i = 0; i < sp; ++i) printf(" "); for (int i = 0; i < st; ++i) printf("*"); printf("\n"); --sp; st += 2; } } | cs |
'백준 > 백준-C++' 카테고리의 다른 글
2443번: 별찍기 - 6 (0) | 2017.09.15 |
---|---|
2444번: 별찍기 - 7 (0) | 2017.09.15 |
1652번: 누울 자리를 찾아라 (0) | 2017.09.15 |
13458번: 시험 감독 (0) | 2017.09.15 |
재귀와 동적 프로그래밍 (0) | 2017.09.13 |
Comments