program to check palindrome number
// program to test palindrome number
#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
{
int n,dig,rev=0,temp;
clrscr();
printf("Enter a number:");
scanf("%d",&n);
temp=n;
while(temp!=0)
{
dig=temp%10;
rev=rev*10+dig;
temp=temp/10;
}
printf("nnThe reverse of %d is %d",n,rev);
if(rev==n)
{
printf("nn%d is palindrome",n);
}
else
{
printf("nn%d is not palindrome",n);
}
getch();
}
