answersLogoWhite

0

#include
int main()
{
int num, r, sum=0, temp;
print f("enter a number:");
scan f("%d",&num);
temp=num;
while(n!=0)
{
r=num%10;
num=num/10;
sum=sum*10+r;
}
if(temp==sum)
print f("%d is a palindrome",temp);
else
print f("%d is not a palindrome",temp);
return 0;
}

User Avatar

Wiki User

12y ago

What else can I help you with?