#include
void main ()
{
int no,r,res,temp=0;
clrscr ();
printf ("Enter Number: ");
scanf ("%d",&no);
r=res=0;
temp=no;
while (no>0)
{
r=no%10;
no=no/10;
res=(res*10)+r;
}
if (temp==res)
printf("Number is Palandrom");
else
printf("Number is not Palandrom");
getch ();
}
No comments:
Post a Comment