Write a c++ program to check whether the given string is palindrome or not

Write a c++ program to check whether the given string is palindrome or not. This program will check the number is palindrome or not which is the number same after reversed in c++ programming language.This program helps you to find the palindrome in C++ language

#include <iostream>
using namespace std;
int main()
{
int n, num, count, rev = 0;
cout << "Enter the number";
cin >> num;
n = num;
do
{
count = num % 10;
rev = (rev * 10) + count;
num = num / 10;
} 
while (num != 0);
cout << "The reverse number is" << rev << endl;
if (n == rev)
cout << " The number is palindrome";
else
cout << " The number is not palindrome";
return 0;
}

Output:

Enter the number 4554                                                                                                                 

The reverse number is 4554                                                                                                           

 The number is palindrome