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" nate' title='Atom feed' href='https://git.ruby-lang.org/ruby.git/atom/sample/README?h=v1_8_5_54' type='application/atom+xml'/>
summaryrefslogtreecommitdiff
path: root/sample/README
AgeCommit message (Expand)Author