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 Program to find the largest of 4 no using macros.
How many types of comments are there in c++?
Why we use #include iostream in c++?
What are the four partitions in which c++ compiler divides the ram?
Which c++ compiler is best?
Differentiate between a constructor and a method in C++.
What data structure is fastest, on average, for retrieving data: a) Binary Tree b) Hash Table c) Stack
Name four predefined macros.
What are the characteristics of friend functions?
If you don’t declare a return value, what type of return value is assumed?
What is setfill c++?
How do you clear a map in c++?
What is the difference between cin.read() and cin.getline()?
When should overload new operator on a global basis or a class basis?
Are there any special rules about inlining?