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
What is a try block?
How does a C++ structure differ from a C++ class?
Is python better than c++?
Can class objects be passed as function arguments?
What is meaning of in c++?
Who created c++?
Describe the setting up of my member functions to avoid overriding by the derived class?
How much do coding jobs pay?
What is the hardest coding language to learn?
Can manipulators fall in love?
Why is c++ is better than c?
what you know about c++?
Define whitespace in C++.
What is a multiset c++?
Explain virtual class and friend class.