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
What c++ is used for?
Who was the creator of c++?
Write a C++ Program to check whether a number is prime number or not?
What is general format for a prototype?
Refer to a name of class or function that is defined within a namespace?
Can a function take variable length arguments, if yes, how?
What are pointer-to-members? Explain.
What is an overflow error?
What doescout<<(0==0) print out a) 0 b) 1 c) Compiler error: Lvalue required
Explain how a pointer to function can be declared in C++?
Show the declaration for a pointer to function returning long and taking an integer parameter.
Where the memory to the static variables is allocated?
What are activex and ole?
How much do c++ programmers make?
Is overriding possible in c++?