//this is a program to display whether the entered number is a Palindrome or not
#include<stdio.h>
#include<conio.h>
void main()
{
int rem,rev=0,num,ori;
printf("\n\nEnter any Number: ");
scanf("%d",&num);
ori=num;
while(num>0)
{
rem=num%10;
rev=(rev*10)+rem;
num=num/10;
}
if(rev==ori)
{
printf("\n\nThe Entered Number %d is a Palindrome Number.",ori);
}
else
{
printf("\n\nThe Entered Number %d is a Palindrome Number.",ori);
}
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int rem,rev=0,num,ori;
printf("\n\nEnter any Number: ");
scanf("%d",&num);
ori=num;
while(num>0)
{
rem=num%10;
rev=(rev*10)+rem;
num=num/10;
}
if(rev==ori)
{
printf("\n\nThe Entered Number %d is a Palindrome Number.",ori);
}
else
{
printf("\n\nThe Entered Number %d is a Palindrome Number.",ori);
}
getch();
}