write program for palindrome

Answer Posted / badsha

#include<iostream.h>
void main()
{
int m=0,n,s=0,r;
cout<<"Enter any number :"<<endl;
cin>>n;
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(m==s)
{
cout<<"it is palindrom :"<<endl;
}
else
{
cout<<"No is Not palindrom :"<<endl;
}
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;

1717


What are pointer-to-members? Explain.

802


What is c++ 11 and c++ 14?

812


How we can differentiate between a pre and post increment operators during overloading?

832


What are the various compound assignment operators in c++?

714


Can you Mention some Application of C/C++?

811


What is algorithm in c++ programming?

784


What c++ library is string in?

780


Is c++ used anymore?

826


Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?

3903


Do you know about latest advancements in C++ ?

853


What is a constant reference?

817


What is a literal in c++?

739


Define Virtual function in C++.

833


Why would you use pointers in c++?

820