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
"
Copyright © Scott Stevenson 2004-2015
by rob mayoff — Dec 05
counter = 0
for n in (0...10000)
counter += 1 if (n.to_s == n.to_s.reverse)
end
puts counter