write program for palindrome
Answer Posted / vijay kumar
#include<stdio.h>
#include<conio.h>
void main()
{
int n,rev=0,m,r;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
rev=rev*10+r;
n=n/10;
}
if(rev == m) // This is important step
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the full form of dos?
Do vectors start at 0 c++?
What is setbase c++?
Describe the setting up of my member functions to avoid overriding by the derived class?
When can I use a forward declaration?
What is singleton class in c++?
What is data type in c++?
Why do we use classes in programming?
What is #include iostream h in c++?
How c functions prevents rework and therefore saves the programers time as wel as length of the code ?
Describe new operator and delete operator?
What are manipulators used for?
What are the unique features of C++.
What happens when you make call 'delete this;'?
What does scope resolution operator do?