Palindrome coding #include using namespac…

Palindrome coding

#include
using namespace std;
int main()
{
int palindrome, reverse=0;
cout<>palindrome;
int num=0,key=palindrome;
for(int i=1;palindrome!=0;i++){

num=palindrome%10;
palindrome=palindrome/10;
reverse=num+(reverse*10);
}

if(reverse==key){
cout<<key<<" is a Palindrome Number";
}
else{
cout<<key<<"is NOT a Palindrome Number";
}
return 0;
}

@ Madurai Kamaraj University

This post is pressed by Chikoo

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s