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 are the characteristics of friend functions?
What are separators in c++?
Write about the retrieval of n number of objects during the process of delete[]p?
What is isdigit c++?
List the types of polymorphism in c++?
What is the best c++ book?
How the keyword struct is different from the keyword class in c++?
what you know about c++?
What is a static member?
What size is allocated to the union variable?
Is atoi safe?
What is the difference between set and map in c++?
Which is best ide for c++?
What do you mean by function overriding & function overloading in c++?
Why is c++ still best?