> BTW How would I then access $fib to puts an output of the sequence eg. 0 > 1 1 2 3 5 8 13 etc. The best I could do was something like: printf("Enter a number: ") i = gets puts "The #{i.to_i} Fibonacci number is #{fib(i.to_i)} " 0.upto(i.to_i){|k| printf(" #{$fib[k]}") } -- Posted via http://www.ruby-forum.com/.