C++

How To Find that The Given Number is Palindrome or Not in C++

C++ Program to Check Whether a Number is Palindrome or Not

Hi,Today we make a program About How To find that the given number is palindrome or not.we Get vaule for User it Number is Palindrome or not.Now We Will check it.

C++ Program to Check Whether a Number is Palindrome or Not

#include<iostream>
#include<conio.h>
using namespace std;
main()
{
int number,a,b,c,d,e,f,g,h,mango;
cout<<"Ente the five digit number:";
cin>>number;
cout<<endl;
mango=number/10000;
a=number%10000;
b=a/1000;
c=a%1000;
d=c/100;
e=c%100;
f=e/10;
g=e%10;
cout<<mango<<b<<d<<f<<g<<endl;
if(mango==g && b==f)
cout<<"Number is Palindrom";
else
cout<<"Number is not a Palindrom";
getch();
}

Output of ProgramC++ Program to Check Whether a Number is Palindrome or Not

About the author

Code

Learn Programming, Design and Development.

Add Comment

Click here to post a comment