Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (10 sloc) 155 Bytes
def fact(n)
if n == 0
1
else
n * fact(n-1)
end
end
g = ARGV[1].to_i
l = ARGV[0].to_i
puts "#{l} in #{g}: #{fact(g)/(fact(l)*(fact(g-l)))}"