write program for palindrome
Answer Posted / saurav sadangi
#include<stdio.h>
int main(){
int m,n,sum=0,r;
printf("Enter n: ");
scanf("%d",&n);
m=n;
while(n>0){
r=n%10;
sum=sum*10+r;
n=n/10;
}
if(sum==m){
printf("The no %d is pallendrom\n",m);
}
else{
printf("The no %d is not pallendrom\n",m);
}
system("PAUSE");
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is c++ a good beginners programming language?
What is an adaptor class in c++?
What are c++ redistributables?
How does the copy constructor differ from the assignment operator (=)?
what is scupper?
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
Is ca high or low level language?
Why do we need constructors in c++?
Can comments be longer than one line?
Differentiate between late binding and early binding.
How is c++ used in the real world?
How would you use qsort() function to sort an array of structures?
What is the function of I/O library in C++ ?
What does flush do?
Define a constructor - what it is and how it might be called (2 methods)?