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 is helper in c++?
Carry out conversion of one object of user-defined type to another?
Write a program using display() function which takes two arguments.
Explain the advantages of using friend classes.
Is c++ primer good for beginners?
What is iostream in c++ used for?
Explain what are accessor methods?
What are c++ redistributables?
write a programme to get a character and thier ASCII value
What does ctime() do?
What is the this pointer?
What will strcmp("Astring", "Astring"); return a) A positive value b) A negative value c) Zero
Explain how to initialize a const member data.
Do you know the use of vtable?
How c functions prevents rework and therefore saves the programers time as wel as length of the code ?