write program for palindrome
Answer Posted / saurav sadangi
#include<stdio.h>
int main(){
int n,s=0,r,m;
printf("Enter m:- ");
scanf("%d",&m);
n=m;
while(m>0){
r=m%10;
s=(s*10)+r;
m/=10;
}
printf("The reverse no is %d\n",s);
if (s==n)
printf("%d is pallendrom.\n",n);
else
printf("%d is not pallendrom.\n",n);
system("PAUSE");
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which is better turbo c++ or dev c++?
What are the defining traits of an object-oriented language?
What is tellg () in c++?
What is the difference between the indirection operator and the address of oper-ator?
What is an incomplete type in c++?
What are the different types of comments allowed in c++?
Is c better than c++?
Describe exception handling concept with an example?
Differentiate between a constructor and a method in C++.
When does a 'this' pointer get created?
How do I make turbo c++ full screen?
program explaining feautures of c++
Is c++ vector a linked list?
Reverse the Linked List. Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL
What are the characteristics of friend functions?