C++ program to check whether given number is Palindrome or not.


#include<stdio.h>
#include<conio.h>
void main()
 {
 int num,rem,sum=0,temp;
 clrscr();
 printf("\n enter the value of num");
 scanf("\n %d",&num);
 temp=num;
 while(num>0)
  {
  rem=num%10;
  sum=rem+(sum*10);
  num=num/10;
  }
  if(temp==sum)
   {
   printf("\n number is palindrome");
   }
   else
            {
            printf("\n number is not palindrome");
            }
  getch();
  }
/*output

 enter the value of num121
number is palindrome */