#include <stdio.h>
#include <conio.h>
void main()
{
int n=0, rev=0, n1=0, rem=0;
printf("enter the no");
scanf("%d",&n);
n1=n; // because after the loop, the value of n is lost to zero
while(n>0)
{
rem=n%10;
rev=rev*10+rem;
n=n/10;
}
if(n1==rev) //condition here if the entered no is equal to the reverse of the number.
printf("the given number is palindrom");
else
printf("the given number is not palindrom");
}