Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Commit

Permalink
Added solution for Palindrome Number problem in cpp (#542)
Browse files Browse the repository at this point in the history
  • Loading branch information
MashTerro authored Oct 13, 2021
1 parent 72517e7 commit e616772
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Programming/C++/isPallindrome/numberPalindrome.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <iostream>
using namespace std;
int main()
{
int num,r,sum=0,temp;
cout<<"Enter the Number: ";
cin>>num;
temp=num;
while(num>0)
{
r=num%10;
sum=(sum*10)+r;
num=num/10;
}
if(temp==sum)
cout<<"Palindrome Number";
else
cout<<"Not Palindrome Number";
return 0;
}

0 comments on commit e616772

Please sign in to comment.