Skip to content

Commit 9e19ed3

Browse files
committed
Solve : 019 문제 해결
1 parent 7961396 commit 9e19ed3

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
문제19 : 제곱을 구하자
2+
3+
공백으로 구분하여 두 숫자 a와 b가 주어지면, a의 b승을 구하는 프로그램을 작성하세요.

Challenge/JisuKim/019.square/solve.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// 문제19 : 제곱을 구하자
2+
3+
// 공백으로 구분하여 두 숫자 a와 b가 주어지면, a의 b승을 구하는 프로그램을 작성하세요.
4+
5+
const num = prompt('두 숫자 입력');
6+
const arr = num.split(' ');
7+
8+
parseInt(arr[0])**(parseInt(arr[1]))

0 commit comments

Comments
 (0)