write program for palindrome
Answer Posted / easwar
#include<stdio.h>
#include<conio.h>
void main()
{
int n,s=0,m,r;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(s == m) // This is important step
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 172 Yes | 77 No |
Post New Answer View All Answers
What kind of problems can be solved by a namespace?
Why is swift so fast?
What is the maximum combined length of command line arguments including the space between adjacent arguments?
What are destructors?
How c functions prevents rework and therefore saves the programers time as wel as length of the code ?
What is the full name of logo?
State two differences between C and C++.
How do I use turbo c++?
How one would use switch in a program?
Can we use this pointer in a class specific, operator-overloading function for new operator?
Is c++ the hardest language?
Explain virtual destructor?
How does a copy constructor differs from an overloaded assignment operator?
find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.
What are the advantage of using register variables?