write program for palindrome
Answer Posted / dude
#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 == n) // This is important step
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 199 Yes | 137 No |
Post New Answer View All Answers
Difference between a homogeneous and a heterogeneous container
What is ostream in c++?
Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?
Why was c++ created?
Will the following program execute?
Why do we use using namespace std in c++?
List the merits and demerits of declaring a nested class in C++?
What are the two types of comments?
Do you know the use of vtable?
Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?
What you know about structures in C++?
What is == in programming?
What is c++ in english?
Differentiate between realloc() and free().
Why c++ is so important?