Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (10 sloc) 130 Bytes
def fib(n)
if n == 0 || n == 1
n
else
fib(n-1) + fib(n-2)
end
end
36.times do |i|
puts "n=#{i} => #{fib(i)}"
end
Something went wrong with that request. Please try again.