write program for palindrome
Answer Posted / saurav sadangi
#include<stdio.h>
int main(){
int n,s=0,r,m;
printf("Enter m:- ");
scanf("%d",&m);
n=m;
while(m>0){
r=m%10;
s=(s*10)+r;
m/=10;
}
printf("The reverse no is %d\n",s);
if (s==n)
printf("%d is pallendrom.\n",n);
else
printf("%d is not pallendrom.\n",n);
system("PAUSE");
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is map thread safe c++?
How do you compile the source code with your compiler?
What is c++ runtime?
Describe new operator?
Can I have a reference as a data member of a class? If yes, then how do I initialise it?
Explain bubble sorting.
Mention the storage classes in c++.
Why cout is used in c++?
What kind of jobs can I get with c++?
Is c++ map a hash table?
How would you call C functions from C++ and vice versa?
What is the function of I/O library in C++ ?
What is the equivalent of Pascal's Real a) unsigned int b) float c) char
What is a null object in c++?
Can circle be called an ellipse?