write program for palindrome
Answer Posted / dinakar
#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 ? | 242 Yes | 88 No |
Post New Answer View All Answers
What is the use of cmath in c++?
How do you decide which integer type to use?
What is a multimap c++?
Which of the following is evaluated first: a) && b) || c) !
Why struct is used in c++?
What is #include math h in c++?
Is there structure in c++?
Explain Text Manipulation Routines?
what is c++
When must you use a pointer rather than a reference?
Which bitwise operator is used to check whether a particular bit is on or off?
Differentiate between an external iterator and an internal iterator?
Mention the purpose of istream class?
What is dev c++ used for?
What is function overriding in c++?