#include<iostream
>
#include<conio.h
>
using namespace std;
int main()
{
int n, num, reverse=0;
cout<<"Enter a number : ";
cin>>n;
num=n;
while(num!=0)
{
reverse=(num%10)+(reverse*10);
num=num/10;
}
if(n==reverse)
cout<<n
<<" is a Palindrome Number.";
else
cout<<n
<<" is not a Palindrome Number.";
getch();
return 0;
}
No comments:
Post a Comment