Posted By

adino on 02/21/15


Versions (?)

30 Fibonacci Numbers Without Using Numbers In Ruby(58)

 / Published in: Ruby

Cut down another 4 characters due to requirement dropping : space ascii code is 32, b = 32/32 => 1 and that modulo 1 is zero. It's just question of iterating through after that.

  1. s=' '.ord;a=s%b=s/s
  2. b.upto(s-b-b){|x|p "#{x} #{a=b+b=a}"}

Report this snippet  

You need to login to post a comment.