Home  >  etc  >  C++  >  C++ Program To Check Whether A Number Is Palindrome Or Not

So this project is based on C++ programming,

A Palindrome number is a number that is same after reverse. For example 121, 34543, 343, 131, 48984 are the palindrome numbers.

Check Palindrome Number or Not

To check whether a number given by user is a palindrome number or not in C++, first receive the number, initialize its value to a variable say temp and reverse the value of temp. After reversing, check whether the original number is equal to temp or not.


Palindrome number algorithm

  • 1. Get the number from user.

  • 2. Hold the number in temporary variable.

  • 3. Reverse the number.

  • 4. Compare the temporary number with reversed number.

  • 5. If both numbers are same, print palindrome number.

  • 6. Else print not palindrome number.

The Image May Subject to Copyright.

That is, if original number is equal to the value of rev (original number's reverse or temp's reverse), then print a message like, it is a palindrome number, otherwise print a message like, it is not a palindrome number as shown in the program given below :

C++

First, Create an C++ file with the name of first-file.cpp and paste the code given below, in your C++ file. Remember, you’ve to create a file with .cpp extension.

Note*: Click on the C++ Code then press ctrl + A to select the whole C++ Code, then ctrl + C to copy.


Let's Run the Program :

The Image May Subject to Copyright.
The Image May Subject to Copyright.
The Image May Subject to Copyright.

One-Tap to Get the File


Note*: After Clicking the Download button wait for sometime.
If the source file dosen't start to download, then allow this site to download files in your system.

Frequently Asked Questions

Q 1: Can I use this Source Code without giving credits ?

Ans: Yes, you can use but if your bring this projects, then should give us a credit at footer, because it takes alot time make all thess kinds of projects now if you ask that I want to bring it online but I will not give any credits to the developers & the provider then it is very wrong.

Q 2: Actually I want to bring this project online but I don't want to give credits ?

Ans: Ok, we have problem but also you cannot claim that it is made by you.
It is not all about flex you should increase you knowledge.

Q 3: If I am bringing this project online and not giving credits & claiming it is developed by me then ?

Ans: Ok, 1-3 times you will be warned and your that site will be suspended.
Still if you continue, then it can become to a legal things.

2 Comments

Queen

4 months ago Reply

Love you.

DJ

1 Year ago Reply

Thank You.

Leave a reply

Your email address will not be published. Required fields are marked *

Name *
Email *