A palindrome number is one that remains the same on reversal. Some examples are 8, 121, 212, 12321, -454. To check if a number is a palindrome or not, we reverse it and compare it with the original number. If both are the same, it's a palindrome otherwise not.
output:
Enter a number to check if it's a palindrome or not
2
2 is a palindrome number.
need an explanation for this answer? contact us directly to get an explanation for this answer