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
Explain Text Manipulation Routines?
How is c++ different from java?
What is vector pair in c++?
What is main function in c++ with example?
what is C++ exceptional handling?
What are the rules about using an underscore in a c++ identifier?
Tell me what are static member functions?
How compile and run c++ program in turbo c++?
How do I use arrays in c++?
Can we sort map in c++?
Why is it called c++?
Which compiler does turbo c++ use?
What are keywords in c++?
What is purpose of new operator?
Is java a c++?