Palindrome Number Program using C

This “Palindrome Number Program in C language” post explains clearly how to implement the logical program to check the given input number is Palindrome or Not using C language syntax.


Palindrome Number: Reverse of a given number equals to the same number

#include<stdio.h>
void main()
{
int n, r, sum=0 , temp;
printf(“Enter one number : “);
scanf(“%d”, &n);

temp=n ;
while(n>0)
{
r=n%10;
sum = sum*10 + r;
n=n/10;
}
n=temp;
if(n==sum)
printf(“Palindrome number”);
else
printf(“Not a Palindrome number”);
}

Share this