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
Differentiate between the message and method in c++?
How can I improve my c++ skills?
What are default parameters? How are they evaluated in c++ function?
Can constructor be private in c++?
Can you please explain the difference between overloading and overriding?
What are function prototypes?
What is an operator function? Describe the function of an operator function?
What is the difference between method overloading and method overriding in c++?
Why do we need c++?
What is helper in c++?
Explain the term memory alignment?
Is c++ map a hash table?
What is polymorphism and its type in c++?
When is the copy constructor called?
what is oops and list its features in c++?