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.
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 :
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
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.
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.
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.
Queen
4 months ago ReplyLove you.
DJ
1 Year ago ReplyThank You.