program to check for palindrome number
#include<stdio.h>
int main()
{
int n,r,s=0,temp;
printf("Enter the number:");
scanf("%d",&n);
temp=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(temp==s)
printf("\n Pallindrome");
else
printf("\n Not pallindrome");
}
#include<stdio.h>
int main()
{
int n,r,s=0,temp;
printf("Enter the number:");
scanf("%d",&n);
temp=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(temp==s)
printf("\n Pallindrome");
else
printf("\n Not pallindrome");
}
Post a Comment