#include<iostream>
using namespace std;
class palindrome
{
    int num, rev=0, rem, temp;
    public:
    void getdata();
    void results();
};
void palindrome::getdata()
{
    cout<<"Enter the Number: ";
    cin>>num;
    cout<<num;
}
void palindrome::results()
{
    temp = num;
    while(temp>0)
    {
        rem = temp%10;
        rev = (rev*10)+rem;
        temp = temp/10;
    }
    if(rev==num)
        cout<<"\nThe given number is pallindrome";
    else
        cout<<"\nIt is not a Palindrome Number";
    }
int main()
{
    palindrome x;
    cout <<"Check pallindrome or not "<<endl; 
    x.getdata();
    x. results();
    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: