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


Please Help Members By Posting Answers For Below Questions

What is c++ course?

782


How a modifier is similar to mutator?

869


How new/delete differs from malloc()/free?

845


Show the declaration for a pointer to function returning long and taking an integer parameter.

772


Explain container class.

934


What is the difference between #import and #include in c++?

819


Where are setjmp and longjmp used in c++?

832


What is the best c++ ide?

827


What does flush do?

754


What is prototype for that c string function?

868


How do you invoke a base member function from a derived class in which you’ve overridden that function?

795


Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?

779


How do I start a c++ project?

784


What are compilers in c++?

830


What is else if syntax?

878