write program for palindrome
Answer Posted / uday
#include<stdio.h>
#include<conio.h>
void main()
{
int n,s=0,m;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(s == m) // This is important step
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the use of endl?
What are different types of loops in c++?
What is expression parser in c++
Difference between delete and free.
What operator is used to access a struct through a pointer a) >> b) -> c) *
What do you mean by delegate? Can a user retain delegates?
What is the difference between a type-specific template friend class and a general template friend class?
What happens when you make call 'delete this;'?
What is the identity function in c++? How is it useful?
Is c++ platform dependent?
What is a responder chain?
What's the hardest coding language?
List the issue that the auto_ptr object handles?
What is different in C++, compare with unix?
What are the rules for naming an identifier?