write program for palindrome
Answer Posted / sanam baig
#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 ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can we declare a base-class destructor as virtual?
What are dynamic type checking?
write a porgram in c++ that reads an integer and print the biggest digit in the number
What is prototype in c++ with example?
what is Member Functions in Classes?
Is it possible to provide special behavior for one instance of a template but not for other instances?
What are separators in c++?
What is the difference between the functions memmove() and memcpy()?
Differentiate between an inspector and a mutator ?
What is the best it certification?
How do you establish a has-a relationship?
what is a reference variable in C++?
Can we make copy constructor private in c++?
What do you mean by translation unit?
What are the differences between the function prototype and the function defi-nition?