Bhuvan InfoTech Android App

Download our Android App and browse Technical News, Projects, Computer Tricks more easily with lots of Interesting Features.

Tuesday, June 14, 2016

check if a number is palindrome or not | C program

#include <stdio.h>
int main()
{
   int no, reverse_no=0, remn,x;
   printf("Enter an integer: ");
   scanf("%d", &no);
   x=no;
   while(x!=0)
   {
      remn=x%10;
      reverse_no=reverse_no*10+remn;
      x/=10;
   }
   if(reverse_no==no)
      printf("%d is a palindrome number",no);
   else
      printf("%d is not a palindrome number",no);
   return 0;
}
Bhuvan Arora

No comments:

Amazing Deal !