Recursive Ruby – Fibonacci
15 December 2013
def fibo(num) if num < 2 num else fibo(num-1) + fibo(num-2) end endfibo(7) //=>13
ruby
13
san francisco
20
Fibonacci number
1
Ruby
7
« Previous
Archive
Next »