write program for palindrome
Answer Posted / lakshmi narayana
#include<stdio.h>
main()
{
int n,s=0,m;
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
int r=n%10;
s=s*10+r;
n=n/10;
}
if(s == m) // This is important step
printf("the no is palindrome\n");
else
printf("no is not palindrome\n");
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is ca high or low level language?
What are shallow and deep copy?
What does std :: flush do?
What are the effects after calling the delete this operator ?
When should overload new operator on a global basis or a class basis?
What is cout flush?
How can I learn c++ easily?
Describe new operator?
What is the difference between #import and #include in c++?
What type of question are asked in GE code writing test based on c++ data structures and pointers?
What is vector string in c++?
Is it possible to get the source code back from binary file?
Search for: what is pair in c++?
What are the differences between java and c++?
What is a tree in c++?