#include<stdio.h>
#include<conio.h>
void main()
{
int num, temp = 0,i;
printf("Enter a number");
scanf("%d",&num);
i = num;
while(num > 0)
{
temp = (temp*10) + (num%10);
num = num/10;
}
if(i==temp)
printf("Number is palindrom");
else
printf("Number is not palindrom");
}
0 comments: (+add yours?)
Post a Comment