#include<stdio.h>
void main()
{
int n, rev=0, rem,temp;
clrscr();
printf("Enter any number: ");
scanf("%d", &n);
temp=n;
while(temp!=0)
{
rem=temp%10;
rev=rev*10+rem;
temp=temp/10;
}
if(rev==n)
printf("%d is a Palindrome",n);
else
printf("%d is not a Palindrome",n);
getch();
}
ReplyDeletenice article for beginners.thank you.
javacodegeeks
welookups