Skip to content

Commit 26e779b

Browse files
authored
Merge pull request #12 from tony9402/2438
[ADD] baekjoon 2438 cpp solution
2 parents 879ef43 + 760f7ab commit 26e779b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

solutions/baekjoon/2438/main.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Authored by: tony9402
2+
// Co-authored by: -
3+
// Link: http://boj.kr/9a6e490b384645388ae1aaefc4c04e8f
4+
#include<bits/stdc++.h>
5+
6+
using namespace std;
7+
8+
int main() {
9+
ios::sync_with_stdio(false);
10+
cin.tie(0);
11+
12+
int N; cin >> N;
13+
for(int i = 1; i <= N; ++i) {
14+
for(int j = 1; j <= i; ++j) {
15+
cout << "*";
16+
}
17+
cout << "\n";
18+
}
19+
20+
return 0;
21+
}
22+
23+
/* Solution Description
24+
i는 1부터 N까지 j는 1부터 i까지 중첩 반복문으로 풀면 되는 문제.
25+
*/

0 commit comments

Comments
 (0)