puts "Enter the number" num=gets.chomp.to_i if(num.to_s.reverse.to_i==num) puts "#{num} is a palindrome" else puts "#{num} is not a palindrome" end