I'm a Japanese programmer. I write about C#, Ruby and JavaScript.
def fib(n) if n < 2 1 else fib(n - 2) + fib(n - 1) endend
puts fib(10) #=> 89
Post a Comment
No comments:
Post a Comment