mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Simplify a sample code (#2374)
This commit is contained in:
parent
dce1e14e80
commit
72adc6cffb
1 changed files with 2 additions and 2 deletions
|
@ -4,6 +4,6 @@ def fact(n)
|
|||
n.downto(1) do |i|
|
||||
f *= i
|
||||
end
|
||||
return f
|
||||
f
|
||||
end
|
||||
print fact(ARGV[0].to_i), "\n"
|
||||
puts fact(ARGV[0].to_i)
|
||||
|
|
Loading…
Add table
Reference in a new issue