#include <stdlib.h>
int main()
{
int n,revers=0,temp;
printf("Enter the number...");
scanf("%d",&n);
temp=n;
while(temp!=0)
{
revers=revers*10;
revers=revers + temp%10;
temp=temp/10;
}
if(n==revers)
printf("%d is palindrome",revers);
else
printf("%d is not palindrome",n);
return 0;
}
0 comments:
Post a Comment