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
Is c++ a low level language?
Is c++ a good beginners programming language?
What is format for defining a structure?
Does c++ support multilevel and multiple inheritances?
What does return 0 do in c++?
Define basic type of variable used for a different condition in C++?
Briefly describe a B+ tree. What is bulk loading in it?
Write some differences between an external iterator and an internal iterator?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it.
What problems might the following macro bring to the application?
Why can’t you call invariants() as the first line of your constructor?
In the derived class, which data member of the base class are visible?
What is the type of 'this' pointer?
How many types of scopes are there in c++?
How can you quickly find the number of elements stored in a dynamic array?