write program for palindrome
Answer Posted / syfith
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n,k,i,t,rev;
cout<<"enter your number = ";
cin>>n;
k=n;
while(t>0)
{
i=n%10;
rev=rev*10+i;
t=n/10;
n=n/10;
}
if(rev==k)
cout<<"it is a palindrome";
else
cout<<"it is not a palindrome";
getch();
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What problems might the following macro bring to the application?
What is the difference between global variables and local variable
what are Access specifiers in C++ class? What are the types?
What are vectors used for in c++?
Function can be overloaded based on the parameter which is a value or a reference. Explain if the statement is true.
Explain linked list using c++ with an example?
What is a class definition?
Can we use clrscr in c++?
What is a class template?
Am pass the 10000 records to target in target I will take commit interval 15000 when I was stop the work flow what will happened
What is difference between array and vector in c++?
What are features of c++?
What is a c++ map?
Is the declaration of a class its interface or its implementation?
Is c++ slower than c?