Skip to content

Instantly share code, notes, and snippets.

@jerry
Created April 27, 2009 14:28
Show Gist options
  • Save jerry/102515 to your computer and use it in GitHub Desktop.
Save jerry/102515 to your computer and use it in GitHub Desktop.
include Math
(10..99).each do |f|
fr = f.to_s.reverse.to_i
fsq = sqrt(f+fr)
p "#{f} + #{fr} = #{f + fr}" if fsq == fsq.floor
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment