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
What is the role of C++ shorthand's?
How does list r; differs from list r();?
what is pre-processor in C++?
What is a far pointer? where we use it?
What are arrays c++?
What is operator overloading in c++ example?
What is the difference between C and CPP?
What are friend functions in C++?
Can you declare an array without a size in c++?
How many types of modularization are there in c++?
Can I learn c++ without c?
What apps are written in c++?
If there are two catch statements, one for base and one for derived, which should come first?
Explain function overloading
What are the uses of typedef in a program?