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
What is anonymous object in c++?
What are the c++ access specifiers?
What is the meaning of c++?
How did c++ get its name?
What do you mean by late binding?
What is a manipulator in c++?
what is the use of void main() in C++ language?
What is the use of pointer in c++ with example?
Is c++ a high level language?
Can you please explain the difference between using macro and inline functions?
Can comments be longer than one line?
Explain virtual class and friend class.
Is c++ harder than java?
Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?
Differentiate between an inspector and a mutator ?