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
Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;
What are pointer-to-members? Explain.
What is c++ 11 and c++ 14?
How we can differentiate between a pre and post increment operators during overloading?
What are the various compound assignment operators in c++?
Can you Mention some Application of C/C++?
What is algorithm in c++ programming?
What c++ library is string in?
Is c++ used anymore?
Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?
Do you know about latest advancements in C++ ?
What is a constant reference?
What is a literal in c++?
Define Virtual function in C++.
Why would you use pointers in c++?