write program for palindrome
Answer Posted / vijay kumar
#include<stdio.h>
#include<conio.h>
void main()
{
int n,rev=0,m,r;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
rev=rev*10+r;
n=n/10;
}
if(rev == m) // This is important step
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the difference between a pointer and a link in c ++?
What is static class data?
Do you know about latest advancements in C++ ?
What is general format for a prototype?
Is map sorted c++?
the maximum length of a character constant can be a) 2 b) 1 c) 8
What is the main purpose of c++?
What is protected inheritance?
What do you mean by funtion prototype?
In the derived class, which data member of the base class are visible?
What is the use of ::(scope resolution operator)?
What is an inclusion guard?
I want explanation for this assignment: how to connect mysql database using c/c++,please explain this detailly?
Why is c++ still best?
Should the this pointer can be used in the constructor?