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
the maximum length of a character constant can be a) 2 b) 1 c) 8
What is the best c++ book for beginners?
Why is c++ still best?
which operator is used for performing an exponential operation a) > b) ^ c) none
Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list
Difference between pointer to constant and constant pointer to a constant. Give example.
What is class invariant in c++?
Is c++ a programming language?
Can we define a constructor as virtual in c++?
Will a C compiler always compile C++ code a) Yes b) No c) Only optimized compilers
What is the use of pointer in c++ with example?
What is c++ programming language?
What is an inline function in c++?
What is the difference between global int and static int declaration?
Specify different types of decision control statements?