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
Why c++ is called oop?
What is a tuple c++?
What is c++ and its features?
What is the auto keyword good for in c++?
what is c++
Why can templates only be implemented in the header file?
If there are two catch statements, one for base and one for derived, which should come first?
Differentiate between the manipulator and setf( ) function?
What is difference between malloc()/free() and new/delete?
how to connect with oracle 9i with server in socket program in c/c++
What is the syntax for a for loop?
Explain how a pointer to function can be declared in C++?
How static variables and local variablesare similar and dissimilar?
Is c++ map a hash table?
the maximum length of a character constant can be a) 2 b) 1 c) 8