write program for palindrome
Answer Posted / apoorv
#include<stdio.h>
#include<conio.h>
int main()
{
long int n,s=0,m,r;
printf("enter any no");
scanf("%ld",&n);
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(m==s)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
write a programme to get a character and thier ASCII value
Why is "using namespace std;" considered bad practice?
Give 10 points of differences between C & C++.
Write my own zero-argument manipulator that should work same as hex?
What is this pointer in c++?
What is boyce codd normal form in c++?
Is map thread safe c++?
What is the auto keyword good for in c++?
Does there exist any other function which can be used to convert an integer or a float to a string?
What is the use of turbo c++?
What is name hiding in c++?
What is class in c++ with example?
Explain about Garbage Collector?
What is near, far and huge pointers? How many bytes are occupied by them?
Is sorted c++?