#include<stdio.h>
#include<conio.h>
void main()
{
int rem,temp,n,rev=0;
clrscr();
printf("\nEnter any number :- ");
scanf("%d",&n);
temp=n;
while(temp!=0)
{
rem=temp%10;
rev=rev*10+rem;
temp=temp/10;
}
if(n==rev)
{
printf("\nThe given number is pallindrome number");
}
else
{
printf("\nThe given number is non-pallindrome number");
}
getch();
}
No comments:
Post a Comment