summaryrefslogtreecommitdiff
path: root/benchmark/other-lang/fact.rb
blob: 7e97b22b393ae90e6b6a609fcd984032579702d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
def fact(n)
  if n < 2
    1
  else
    n * fact(n-1)
  end
end

i=0
while i<10000
  i+=1
  fact(100)
end