In this C-program we will check the number is Palindromecolor> or not. The number will be taken from the user.color>
input:
The number(i.e : 567,610,7899 etc.)output:
The number will be Palindrome or notCODE---->
#include
#include
{
int b,a=0,r=0,n;
clrscr();
printf("Please,Enter a number:color>");
scanf("%dcolor>",&n);
b=n;
while(n!=0color>)
{
r=n%10;
a=a*10+r;
n=n/10;
}
if(b==acolor>)
printf("\n%d is a Palindrome number.color>",a);
else
printf("\n%d is not a Palindrome number.color>",a);
getch();
}
color>