Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

10 lines (9 sloc) 0.125 kb
def fact(n)
return 1 if n == 0
f = 1
n.downto(1) do |i|
f *= i
end
return f
end
print fact(ARGV[0].to_i), "\n"
Jump to Line
Something went wrong with that request. Please try again.