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 java a c++?
Explain queue. How it can be implemented?
What happens if a pointer is deleted twice?
What c++ is used for?
What is std :: endl?
What can I safely assume about the initial values of variables which are not explicitly initialized?
What parameter does the constructor to an ofstream object take?
What is class definition in c++ ?
What is object in c++ example?
What do you mean by enumerated data type?
What ANSI C++ function clears the screen a) clrscr() b) clear() c) Its not defined by the ANSI C++ standard
What does int * mean in c++?
Is java made in c++?
Assume studentNames and studentIDs are two parallel arrays of size N that hold student data. Write a pseudocode algorithm that sorts studentIDs array in ascending ID number order such that the two arrays remain parallel.
What is a rooted hierarchy?