mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02: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
Add a link
Reference in a new issue