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
When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?
What is private inheritance?
Describe public access specifiers?
Can comments be nested?
Differentiate between an array and a list?
What would happen on forgetting [], while deallocating an array through new?
What is an adaptor class in c++?
What is ctime c++?
What is the difference between *p++ and (*p)++ ?
What are the extraction and insertion operators in c++?
What is a type library?
What are friend functions in C++?
What is DlgProc?
What does std :: flush do?
What is ofstream c++?