write program for palindrome
Answer Posted / deepa garia
#include<stdio.h>
#include<conio.h>
int main()
{
int r,n,k=0,l;
printf("\nENTER THE NUMBER ");
scanf("%d",&n);
l=n;
while(n>0)
{
r=n%10;
n=n/10;
k=k*10+r;
printf("%d",r);
}
if(k==l)
printf("\npalindrome");
else
printf("\n not palindrome");
getch();
return 0;
}
| Is This Answer Correct ? | 16 Yes | 13 No |
Post New Answer View All Answers
Can you Mention some Application of C/C++?
Differentiate between a template class and class template in c++?
How do I use arrays in c++?
Is c++ double?
Does a derived class inherit or doesn't inherit?
How are the features of c++ different from c?
Explain the volatile and mutable keywords.
What is iterator c++?
Explain friend class?
Write my own zero-argument manipulator that should work same as hex?
In c++, what is the difference between method overloading and method overriding?
What is the use of data hiding?
Specify different types of decision control statements?
What is data hiding c++?
What is object in c++ example?