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
Is it possible for a member function to use delete this?
How can we read/write Structures from/to data files?
What is main function in c++ with example?
Do you know what are pure virtual functions?
What is constant in c++ with example?
Explain stack & heap objects?
What is the difference between an external iterator and an internal iterator?
What parameter does the constructor to an ofstream object take?
What is purpose of new operator?
What are the differences between java and c++?
Carry out conversion of one object of user-defined type to another?
What is the basic of c++?
What are the restrictions apply to constructors and destructors?
What are c++ storage classes?
What are formatting flags in ios class?