write program for palindrome
Answer Posted / krishna reddy
#include<stdio.h>
#include<conio.h>
void main()
{
int n,m,s,reverse=0;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n!=0)
{
s=n%10;
reverse=reverse*10+s;
n=n/10;
}
if(m==reverse)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What are virtual functions in c++?
Does c++ support exception handling?
How did c++ get its name?
What size is allocated to the union variable?
In c++, what is the difference between method overloading and method overriding?
What is null and void pointer?
Will rust take over c++?
If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?
why and when we can declar member fuction as a private in the class?
Define pre-condition and post-condition to a member function in c++?
How do you remove an element from a set in c++?
what are the iterator and generic algorithms.
What is a Default constructor?
What is the use of endl?
What is a map in c++?