This C++ program takes a user-input number as input, reverses the number, and compares it to the original to check if it is a palindrome. It uses modulo and division operations in a while loop to extract the ones, tens, hundreds digits of the number and build the reversed number. It then prints whether the original and reversed numbers are equal, identifying the number as a palindrome or not.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
35 views2 pages
Palindrome NO
This C++ program takes a user-input number as input, reverses the number, and compares it to the original to check if it is a palindrome. It uses modulo and division operations in a while loop to extract the ones, tens, hundreds digits of the number and build the reversed number. It then prints whether the original and reversed numbers are equal, identifying the number as a palindrome or not.