write program for palindrome
Answer Posted / muhammad umair arif
#include <iostream>
using namespace std;
void main()
{
int a,b,c,d,e,f;
cout<<"Enter three digit "<<endl;
cin>>a;
b=a/100;
c=a%100;
d=c/10;
e=c%10;
f=e;
if(f==b)
{
if(d==d)
{
if (b==f)
{
cout<<"It is Palindrome "<<endl;
}
}
}
else
cout<<"It isnot Palindrome "<<endl;
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
write a programme to get a character and thier ASCII value
Does c++ have string data type?
Define whitespace in C++.
What is the maximum combined length of command line arguments including the space between adjacent arguments?
What is null and void pointer?
What are member functions used in c++?
How does a copy constructor differs from an overloaded assignment operator?
What does catch(…) mean?
Can constructor be private in c++?
What is c++ try block?
Why is c++ difficult?
What is setf in c++?
What is command line arguments in C++? What are its uses? Where we have to use this?
What is abstraction in c++ with example?
What is the main use of c++?