1 2 3 4 5 6 7 8 9
def fibonacci(n) a,b=0,1 while a<n puts"#{a} " a,b=b,a+b end end print"Number: " fibonacci(gets.chomp.to_i)