Apr 29, 2008

HotRuby

HotRuby - Ruby on JavaScript & Flash


def fib(n)
n <= 2 ? 1 : fib(n - 1) + fib(n - 2)
end

puts fib(10)

No comments: