Sha256: 9d4b21c2b5eb2a215599be266790c041b715869aafeca5d8e413e8a44ed8e9d0
Contents?: true
Size: 138 Bytes
Versions: 8
Compression:
Stored size: 138 Bytes
Contents
def factorial(n) if n > 0 return n * factorial(n-1) else return 1 end end n = ARGV[0] || 5 puts "#{n}! is #{factorial(5)}"
Version data entries
8 entries across 8 versions & 2 rubygems