write program for palindrome
Answer Posted / tarun soni
#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(s==m)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is setbase c++?
What is main function in c++ with example?
Can a Structure contain a Pointer to itself?
How a modifier is similar to mutator?
What is pointer with example?
If a function doesn’t return a value, how do you declare the function?
Differentiate between late binding and early binding. What are the advantages of early binding?
Can I make ios apps with c++?
What is the use of "new" operator?
What are the advantages of using a pointer?
How the virtual functions maintain the call up?
What is the this pointer?
How do you flush std cout?
What is the latest version on c++?
Explain overriding.