Done puzzle 33
[project-euler.git] / euler25.rb
1 load 'fibonacci.rb'
2
3 i = 100
4 while i.fibonacci.to_s.length < 1000
5 i += 1
6 end
7
8 puts "The #{i}th Fibonacci term has #{i.fibonacci.to_s.length} digits"
9 puts "The previous, #{i-1}th Fibonacci term has #{(i-1).fibonacci.to_s.length} digits"