Question: An integer is a palindrome when it reads the same backward as forward. For example, 1 2 1 is palindrome while 1
An integer is a palindrome when it reads the same backward as forward. For example, is palindrome while is not. Any integer that contains only a single digit is a palindrome.
Please write a program that does the following.
It asks the user to input an integer.
If the integer is a palindrome, print a string "The number xx is a palindrome.", where xx indicates the integer typed by the user.
If the integer is not a palindrome, print a string "The number xx is NOT a palindrome.", where xx indicates the integer typed by the user.
If the input string is not an integer, print a string "The input is NOT an integer.".
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
