8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b7ccef commit 5c7ef63Copy full SHA for 5c7ef63
0x0B/solutions/2448_1.cpp
@@ -1,10 +1,13 @@
1
+// Authored by : paulcjy
2
+// Co-authored by : -
3
+// http://boj.kr/b510439ad07b43d2b6a689ff104c3783
4
#include <bits/stdc++.h>
5
using namespace std;
6
-void printStar(int n, int i, int j) {
7
+void print_star(int n, int i, int j) {
8
if (j <= 2*i)
9
if (n == 3 && !(i == 1 && j == 1)) cout << '*';
- else printStar(n/2, i%(n/2), j%n);
10
+ else print_star(n/2, i%(n/2), j%n);
11
else cout << ' ';
12
}
13
@@ -16,7 +19,7 @@ int main() {
16
19
for (int i = 0; i < n; i++) {
17
20
cout << string(n-i-1, ' ');
18
21
for (int j = 0; j <= n+i; j++)
- printStar(n, i, j);
22
+ print_star(n, i, j);
23
cout << '\n';
24
-}
25
+}
0 commit comments