//C++ program : To check whether a given number is palindrome or not
using namespace std;
int n, num, digit, rev = 0;
cout << "Enter a positive number: ";
cin >> num;
n = num;
digit = num%10;
rev = (rev*10) + digit;
num = num/10;
cout << " The reverse of the number is: " << rev << endl;
if (n = = rev)
cout << " The number is a palindrome";
cout << " The number is not a palindrome";
Note: In the program, After #include "iostream" tag is there...
But it is not seen as the post is considered as a HTML post...
So please don't forget this point...
The original file is uploaded as attachment...
Check that also...
IIT Madras - CSE
AttachmentsTo check whether a given number is palindrome or not (2088-3190-To check whether a given number is palindrome or not.txt)