void main()
{
int n, temp, sum=0,d;
printf("\n enter the number:");
scanf("%d",&n);
temp=n;
while (n!=0)
{
d=n%10;
sum = sum*10+d;
n = n/10;
}
if (temp==sum)
printf("\n the number is Palindrome.");
else
printf("\n the number is not Palindrome.");
getch();
}
No comments:
Post a Comment