About us

C Program to find given number is palindrome or not

C Program to find the given number is palindrome or not

C-Program-find-given-number-palindrome-or-not


What is Palindrome Number?

The number will be called Palindrome if it remains the same after reversing its digits.
For Ex. 191
                                          191รณ191



#include<stdio.h>
#include<conio.h>
void main()
{
 int n,temp,r=0;
 clrscr();
 printf("Enter any number\n");
 scanf("%d",&n);
 temp=n;
 while(n!=0)
 {
 r=r*10+n%10;
 n=n/10;
 }
 if(temp==r)
 printf("Given number is a Palindrome Number\n");
 else
 printf("Given number is nont a Palindrome number\n");
 getch();
}

OUTPUT

Enter any number
191
Given number is a Palindrome Number





You can also visit:-