write program for palindrome

Answer Posted / anonymous

#include<stdio.h>
#include<conio.h>
int main()
{
int n,s=0,m,r;
printf("enter any no");
scanf("%d",&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();
return 0;
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain abstraction.

610


Tell me difference between constant pointer and pointer to a constant.

624


Explain "const" reference arguments in function?

603


What is array give example?

586


What is the difference between new() and malloc()?

611






What does iomanip mean in c++?

597


Can we distribute function templates and class templates in object libraries?

583


What is pointer to array in c++?

610


What do you mean by enumerated data type?

568


How do you add an element to a set in c++?

547


How can I learn dev c++ programming?

559


How do you decide which integer type to use?

572


How can you link a c program with a c function?

556


What is c++ & why it is used?

583


Describe delete operator?

614