write program for palindrome
Answer Posted / md.irfan(rourkela)
#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 ? | 1204 Yes | 747 No |
Post New Answer View All Answers
What is array give example?
How can you say that a template is better than a base class?
What is istream c++?
Where can I run c++ program?
Why are pointers not used in c++?
Are iterators pointers?
What are manipulators used for?
What is setiosflags c++?
How do pointers work?
What is c++ library?
Where are setjmp and longjmp used in c++?
If I is an integer variable, which is faster ++i or i++?
What is a pointer with example?
What is a type library?
How we can differentiate between a pre and post increment operators during overloading?