Q14. Write a code to check whether the given number is palindrome or not

Palindrome Number:- A Palindrome Number is a number that remains same when its digits are reversed or we can say that the Palindrome number is a number that is symmetric.

For Example:- 121
So as we can see that the number 121 remains the same when it is reversed so it is a palindrome number.

Algorithm for Palindrome Number

START
Step 1 : Get the number to check for palindrome
Step 2 : Hold the number in temporary variable
Step 3 : Reverse the number
Step 4 : Compare the temporary number with reversed number
Step 5 : If both numbers are same, print “palindrome number”
Step 6 : Else print “not palindrome number”
STOP

Code for Palindrome Number

Output

The number 121 is a Palindrome number

Recommended Programs
Program to find factorial of a number
Program to count number of digits in a number