write program for palindrome

Answer Posted / easwar

#include<stdio.h>
#include<conio.h>
void main()
{
int n,s=0,m,r;
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 == m) // This is important step
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}

Is This Answer Correct ?    172 Yes 77 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain Text Manipulation Routines?

632


How is c++ different from java?

555


What is vector pair in c++?

703


What is main function in c++ with example?

549


what is C++ exceptional handling?

618






What are the rules about using an underscore in a c++ identifier?

626


Tell me what are static member functions?

602


How compile and run c++ program in turbo c++?

618


How do I use arrays in c++?

578


Can we sort map in c++?

585


Why is it called c++?

576


Which compiler does turbo c++ use?

596


What are keywords in c++?

590


What is purpose of new operator?

589


Is java a c++?

550