# 3 – Best C program to check Palindrome Number

## C program to check palindrome number

If number can be read in both direction in same order then the number is palindrome number in nature.

In simple words, if a number is reversed and its still retains same order as that of original number then the number is said to be palindrome number.

E.g. The output obtained by reversing number 121 matches the original number hence, 121 is palindrome number.

Palindrome number logic in C programming.

### Logic to check palindrome number in C

`#include<stdio.h> int main() {     int num,og,rmd,rst=0;     printf("Enter any number=");     scanf("%d",&num);     og=num;     while(num>0)     {         rmd=num%10;         rst=(rst*10)+rmd;         num=num/10;     }     if(og==rst)     {        printf("%d is a palindrome number",og);     }     else     {        printf("%d is not a palindrome number",og);     }    return 0; }`

Output :

Enter any number=121

121 is a palindrome number

### Connect with us on following platforms

We are aiming to explain all concepts of C in easiest terms as possible.
ITVoyagers
Author