write program for palindrome
Answer Posted / easwar
#include<stdio.h>
#include<conio.h>
void main()
{
int n,s=0,m,r;
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 ? | 172 Yes | 77 No |
Post New Answer View All Answers
What are advantages of c++?
Explain the differences between list x; & list x();.
Can member functions be private?
What is function overloading c++?
How a new element can be added or pushed in a stack?
Write about an iterator class?
What is boyce codd normal form in c++?
What is the use of "new" operator?
Who was the creator of c++?
Explain the difference between using macro and inline functions?
What is :: operator in c++?
Can the creation of operator** is allowed to perform the to-the-power-of operations?
Explain what are mutator methods in c++?
How one would use switch in a program?
What is an adaptor class in c++?