Ruby Online Compiler & Playground
HTML/CSS/JavaScript
HTML
CSS
Javascript
C++
C
PHP
Java
Python
Swift
C#
Ruby
Node.JS
Kotlin
jQuery
Go
R
TypeScript
Start Ruby Course
Register
exp iterated multiplication
+15
Author: Lord Krishna
Dark
Public
Save
RB
rb
1
2
3
4
5
6
7
8
9
10
def
exp
(
n
,
m
)
out=
1
for
i
in
(
1
..
m
)
out*=n
end
out
end
puts exp
(
5
,
20
)
Enter to Rename, Shift+Enter to Preview
OUTPUT