#include"conio.h"
{
int m, n, q, r,s;
clrscr();
printf("Welcome to Palindrome\n");
printf("\n Enter the number");
scanf("%d", &n);
m=n;
for(s=0; n>0;)
{
q=n/10;
r=n%10;
s=(s*10)+r;
n=q;
}
if(s==m)
{
printf("The number is a palindrome");
}
else
{
printf("The number is not a palindrome");
}
getch();
}
0 comments:
Post a Comment