mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
11 lines
99 B
Ruby
11 lines
99 B
Ruby
|
def fact(n)
|
||
|
if(n > 1)
|
||
|
n * fact(n-1)
|
||
|
else
|
||
|
1
|
||
|
end
|
||
|
end
|
||
|
|
||
|
8.times{
|
||
|
fact(5000)
|
||
|
}
|