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
What are the defining traits of an object-oriented language?
How do you show the declaration of a virtual constructor?
Describe about storage allocation and scope of global, extern, static, local and register variables?
What does flush do?
Explain linear search.
what are Operators and explain with an example?
Mention the ways in which parameterized can be invoked. Give an example of each.
Eplain extern keyword?
Can you please explain the difference between static and dynamic binding of functions?
Can comments be longer than one line?
What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h
daily Routine of father
which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?
What is abstract class in c++?
What is class in c++ with example?