#include<stdio.h>
#include<conio.h>
main()
{
int num,x,temp,sum;
clrscr();
printf("\n enter the number num");
scanf("\n %d",&num);
for(temp=num;num!=0;num=num/10)
{
x=num%10
sum=sum*10+x;
}
if(temp==sum)
{
printf("\n num is palindrome %d",temp);
}
else
{
printf("\n num is not palindrome %d',temp);
}
return (0);
}
output:-
num=121
num is palindrome