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
Why c++ is not a pure oop language?
Tell me what are static member functions?
What is c++ hash?
How come you find out if a linked-list is a cycle or not?
Can constructor be static in c++?
Can malloc be used in c++?
write a program that withdrawals,deposits,balance check,shows mini statement. (using functions,pointers and arrays)
What is c++ iterator?
List the issue that the auto_ptr object handles?
What are advantages of c++?
Is arr and &arr are same expression for an array?
What is general format for a prototype?
What is a multimap c++?
State two differences between C and C++.
Why do we use classes in programming?