Theocacao
Leopard
Design Element
Comment on "Numeric Palindrome Finder in Ruby"
by rob mayoff — Dec 05
Way, way too complicated. Try this:

counter = 0
for n in (0...10000)
counter += 1 if (n.to_s == n.to_s.reverse)
end
puts counter
Back to "Numeric Palindrome Finder in Ruby"
Design Element

Copyright © Scott Stevenson 2004-2015