write program for palindrome
Answer Posted / sanam baig
#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 ? | 1 Yes | 0 No |
Post New Answer View All Answers
Why do we use iterators?
Describe private, protected and public – the differences and give examples.
Describe linkages and types of linkages?
What is the prototype of printf function?
What is the use of ::(scope resolution operator)?
What is const pointer and const reference?
What is #include ctype h in c++?
What language is a dll written in?
What is the fastest c++ compiler?
Differentiate between the manipulator and setf( ) function?
Differences between private, protected and public and give examples.
What are different types of loops in c++?
What is a list c++?
Why do we need templates?
Will a catch statement catch a derived exception if it is looking for the base class?