C++ palindrome | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

C++ palindrome

Write a function that returns true if a given number is a palindrome, and false, if it is not. Can someone explain it.?

4th Dec 2020, 2:43 PM
Psyco Techie
2 Answers
+ 9
See it's a different code but intension is "same" In this if the number in palindrome it will say yes.. You can do the same while using "true or false" https://code.sololearn.com/c0skGwES03nQ/?ref=app
4th Dec 2020, 2:53 PM
Piyush
Piyush - avatar
0
just create a method that return bool inside check if number is palindrome(number that read the same backwards) inverse the number and compare if it same as original then return true,else return false
4th Dec 2020, 2:50 PM
durian
durian - avatar