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 the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator?
Why c++ is better than c language?
Which programming language should I learn first?
If a function doesn’t return a value, how do you declare the function?
Does a derived class inherit or doesn't inherit?
What are arrays c++?
Describe the advantage of an external iterator.
What is public, protected, private in c++?
What are virtual constructors/destructors?
What is else if syntax?
Can a built-in function be recursive?
Is swift better than c++?
How many standards of c++ are there?
Is c++ a high level language?
What is auto used for in c++?