Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (19 sloc) 0.206 kb
def fib1 a, b
puts a
return if (a >= 100)
fib1(b, a + b)
end
def fib2
a = 0
b = 1
while a <= 100
puts a
newb = a + b
a = b
b = newb
end
puts a
end
fib1 0, 1
puts ''
fib2()
Jump to Line
Something went wrong with that request. Please try again.