Skip to content

Commit 290e14e

Browse files
committed
Solve:문제19번해결
1 parent ec60970 commit 290e14e

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승을 구하는 프로그램을 작성하세요.
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().split(" ");
6+
7+
//console.log(Math.pow(num[0], num[1]));
8+
console.log(num.map((a, i) => a ** a));

0 commit comments

Comments
 (0)