ProAnswers.org

Write a C program to find out the given number is Palindrome Number or Not?

#include

#include 

void main() 

{ 

int n,k,r,sum=0; 

clrscr(); 

printf(“enter the number

”);

scanf(“%d”,n); 

k=n; 

while(n!=0) 

{ 

r=n%10; 

sum=sum*10+r; 

n=n/10; 

} 

if(sum==k) 

printf(“the number is palindrome”); 

else 

printf(“the number is not palindrome”); 

getch(); 

} 

Output: 

enter the number 

323 

the number is palindrome