C++ program to check whether given number is palindrome or not

This is a very simple program we need to be panic for this.A number is said to be palindrome if reversal of the number is equal to itself.For ex:141 is a palindrome number.To find the reverse of the number we need to get each digit of the given number.For this we shall use the number 10.By dividing the number by 10 we get the last digit as remainder and remaining digits as quotients.Now we shall write the code.

class palindrome
    int n,r,rev,temp;
    void check();
void palindrome :: check()
    if(rev == n)
      cout<<"Given number "<<n<<" is palindrome";
      cout<<"Given number "<<n<<" is not palindrome";
void main()
  palindrome ob;



You can download the code:download

Tech Tip : Now work on your software projects remotely from anywhere on any device(PC/Mac/android/iOS) by loading your software development environment into the cloud with high performance hosted citrix vdi from CloudDesktopOnline. If you prefer a dedicated server, try out dedicated gpu hosting from Apps4Rent with 24*7 impeccable tech-support.

About Anuroop D

Very enthusiastic about technology and likes to share my knowledge through blogging. Has Bachelor's in Information Technology and currently pursuing my PhD in Computer Science.
This entry was posted in C++ and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s