Question
4. While playing a game called Random Number, you noticed that some numbers remain the same despite you read their digits forward or backward and
4. While playing a game called Random Number, you noticed that some numbers remain the same despite you read their digits forward or backward and you found that these numbers are called palindrome. You also learn that a palindrome is a word, number, phrase, or other sequence of characters which reads the same backward as forward, such as 5115 or 71717.
Write a user-defined function void checkPalindrome(int n) that determines if a number is palindrome. Continue taking input numbers and check for palindrome until user gives 0 as input.
Sample Input
Enter a number: 3223
Sample Output
It is a palindrome number. Enter a number:
Sample Input
3234
Sample Output
It is not a palindrome number. Enter a number:
Sample Input
0
Sample Output
End of program.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started