-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
function printRightTriangle(size) { | ||
for (var i = 1; i <= size; i++) { | ||
console.log('*'.repeat(i)); | ||
} | ||
} | ||
printRightTriangle(5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# 반복문을 이용해 | ||
# 직각 삼각형 만들기 | ||
def print_right_triangle(size): | ||
for i in range(1, size+1): | ||
print('*' * i) | ||
|
||
print_right_triangle(5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
function RightTriangle(size: number): void { | ||
for (let i = 1; i <= size; i++) { | ||
console.log('*'.repeat(i)); | ||
} | ||
} | ||
RightTriangle(5); |