Skip to content

Instantly share code, notes, and snippets.

@gingeleski
Created January 7, 2015 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gingeleski/bcca5501ee81ab977348 to your computer and use it in GitHub Desktop.
Save gingeleski/bcca5501ee81ab977348 to your computer and use it in GitHub Desktop.
Determines whether a given integer is a palindrome.
# Determines whether a given integer is a palindrome
print "Integer: "
number = gets.chomp.to_s
if number.eql? number.reverse
print "\nThis number is a palindrome."
else
print "\nThis number is not a palindrome."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment