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
Describe Trees using C++ with an example.
How can an improvement in the quality of software be done by try/catch/throw?
How did c++ get its name?
What is meant by entry controlled loop?
What is constructor c++?
Define copy constructor.
How come you find out if a linked-list is a cycle or not?
What is vectorial capacity?
Why should we use null or zero in a program?
Why is main function important?
Why null pointer is used?
Where and why do I have to put the "template" and "typename" keywords?
What is the use of bit fields in structure declaration?
Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?
What are register variables?