#include<stdio.h>
#include<conio.h>
void main()
{
int num,rem,sum=0,n;
printf("\nEnter Number To Check: ");
scanf("%d",&num);
n=num;
while(num)
{
rem=num%10;
sum=sum*10+rem;
num=num/10;
}
if(n==sum)
printf("\n%d Is Palindrome: ",n);
else
printf("\n%d Is Not palindrome:",n);
getch();
}
No comments:
Post a Comment