This website requires JavaScript.
Explore
Help
Sign In
kotovalexarian-likes-github
/
ruby--ruby
mirror of
https://github.com/ruby/ruby.git
Watch
1
Star
0
Fork
You've already forked ruby--ruby
0
Code
Releases
Activity
be8326b2e0
ruby--ruby
/
benchmark
/
other-lang
/
fact.rb
14 lines
106 B
Ruby
Raw
Blame
History
def
fact
(
n
)
if
n
<
2
1
else
n
*
fact
(
n
-
1
)
end
end
i
=
0
while
i
<
10000
i
+=
1
fact
(
100
)
end
View Git Blame
Copy Permalink