write program for palindrome
Answer Posted / m.sathish krishna
#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,s=0,m;
clrscr();
printf("enter n");
scanf("%d",n);
m=n;
while(n>0)
(
r=n%10;
s=s*(10+r);
n=n/10;
}
if(m=n)
{
printf("it is palindrom");
}
else
{
printf("not a polindrom");
}
getch();
}
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Write a program to show polymorphism in C++?
Explain Memory Allocation in C/C++ ?
Is vector a class in c++?
What is a breakpoint?
What are single and multiple inheritances in c++?
What is the use of this pointer in c++?
Which function should be used to free the memory allocated by calloc()?
What does flush do?
Declare a class vehicle and make it an abstract data type.
How a new element can be added or pushed in a stack?
What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal
Explain bubble sorting.
What is heap sort in c++?
Explain the difference between new() and malloc() in c++?
What are enumerations?