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
Is it possible to pass an object of the same class in place of object reference to the copy constructor?
What is public, protected, private in c++?
What relational operators if statements in c++?
What is the auto keyword good for in c++?
What is size_type?
Does c++ have foreach?
What is class and structure in c++?
What is the return value of the insertion operator?
Explain how a pointer to function can be declared in C++?
How the virtual functions maintain the call up?
What are enumerations?
What is c++ hash?
What do you understand by a pure virtual member function?
Keyword mean in declaration?
Out of fgets() and gets() which function is safe to use and why?