write program for palindrome

Answer Posted / madhupriya

#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(m==n)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to declare a pointer to an array of integers?

641


If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?

611


What parameter does the constructor to an ofstream object take?

607


What is c++ flowchart?

673


What do the header files usually contains?

623






Define a conversion constructor?

608


How can you say that a template is better than a base class?

580


What are the two shift operators and what are their functions?

559


What is struct c++?

564


What is class in c++ with example?

566


What's the order in which the objects in an array are destructed?

850


What is time h in c++?

583


What is a string example?

545


In inline " expression passed as argument are evalauated once " while in macro "in some cases expression passed as argument are evaluated more than once " --> i am not getting it plz help to make me understand....

1945


Discuss the possibilities related to the termination of a program before entering the mainq method?

541