write program for palindrome
Answer Posted / amol
#include<stdio.h>
void main()
{
int p,q,r,s=0;
printf("\n Enter the number ::");
scanf("%d",&p);
q=p;
while(p>0)
{
r=p%10;
s=s*10+r;
p=p/10;
}
if(s==q)
{
printf("\n Entered number is palindrome...!!!");
}
else
{
printf("\n Enterde number is NOT a palindrome...!!!");
}
getch();
}
Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
which operator is used for performing an exponential operation a) > b) ^ c) none
Is java a c++?
How is objective c different from c++?
What it is and how it might be called (2 methods).
How do you sort a sort function in c++ to sort in descending order?
What is the use of c++ programming language in real life?
What does ios :: app do in c++?
Why are pointers used?
What is static function? Explain with an example
Where can I run c++ program?
What is a down cast?
How can you create a virtual copy constructor?
What is ostream in c++?
What is DlgProc?
Explain explicit container.