write program for palindrome
Answer Posted / varun tiwari
#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)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How the keyword struct is different from the keyword class in c++?
What is function declaration in c++ with example?
What is the difference between mutex and binary semaphore?
What are c++ files?
What is searching?
What are proxy objects in c++?
What is bubble sort c++?
What return value must conversion operators have in their declaration?
What is wrapper class in c++?
What is tellg () in c++?
Define a conversion constructor?
Difference between a homogeneous and a heterogeneous container
Can we use struct in c++?
What is a storage class? Mention the storage classes in c++.
What gives the current position of the put pointer?