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
What is encapsulation in C++? Give an example.
What is the history of c++?
What are the stages in the development cycle?
What are default parameters? How are they evaluated in c++ function?
What are the c++ access specifiers?
What is the hardest coding language to learn?
What is a unnitialised pointer?
In the derived class, which data member of the base class are visible?
If I is an integer variable, which is faster ++i or i++?
What is the purpose of template?
How does c++ sort work?
Explain how to initialize a const data member.
What is #include ctype h in c++?
What is the difference between public, private, and protected access?
What's c++ used for?