Table of Contents

Palimdrome Number

#include<stdio.h>
#include<conio.h>
void main()

{
{
int n,r,sum=0,ans;
printf("Enter the number=");
scanf("%d",&n);
ans=n;
while(n>0)
{
r=n%10;
sum=(sum*10)+r;
n=n/10;
}
if(ans==sum)
printf("Palindrome number ");
else
printf("not Palindrome");
}

getch();
}

Output

  Enter the number =121

    Palindrome number