Skip to content

Commit 2b7611d

Browse files
committed
Solve:36번 문제해결
1 parent 2547c72 commit 2b7611d

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# 문제36 : 구구단 출력하기
2+
3+
1~9까지의 숫자 중 하나를 입력하면 그 단의 구구단 결과를 한 줄에 출력하는 프로그램을 작성하세요.
4+
5+
```jsx
6+
**입출력**
7+
8+
입력 : 2
9+
출력 : 2 4 6 8 10 12 14 16 18
10+
```
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
# 문제36 : 구구단 출력하기
3+
4+
1~9까지의 숫자 중 하나를 입력하면 그 단의 구구단 결과를 한 줄에 출력하는 프로그램을 작성하세요.
5+
6+
```jsx
7+
**입출력**
8+
9+
입력 : 2
10+
출력 : 2 4 6 8 10 12 14 16 18
11+
```
12+
*/
13+
14+
function solve(x) {
15+
let result = ''
16+
for(let i=1; i<=9; i++){
17+
result += i*x + ' '
18+
}
19+
console.log(result)
20+
}

0 commit comments

Comments
 (0)