#include <stdio.h>
#include <conio.h>
void main()
{
int b,r,n,s=0;
scanf("%d",&n);
b=n;
while(n!=0)
{
r=n%10;
s=s*10 + r;
n/=10;
}
if(s==b)
printf("\n The number is palindrome");
else
printf("\n The number is not palindrome");
getch();
}
#include <conio.h>
void main()
{
int b,r,n,s=0;
scanf("%d",&n);
b=n;
while(n!=0)
{
r=n%10;
s=s*10 + r;
n/=10;
}
if(s==b)
printf("\n The number is palindrome");
else
printf("\n The number is not palindrome");
getch();
}
No comments:
Post a Comment