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


Please Help Members By Posting Answers For Below Questions

Difference between delete and free.

610


We use library functions in the program, in what form they are provided to the program?

592


How do you sort a sort function in c++ to sort in descending order?

552


What is buffer and example?

523


Should a constructor be public or private?

535






Is c++ low level?

574


What are the 2 main types of data structures?

582


Const char *p , char const *p What is the difference between the above two?

656


What is difference between n and endl in c++?

582


What number of digits that can be accuratly stored in a float (based on the IEEE Standard 754)? a) 6 b) 38 c) An unlimited number

776


When should we use multiple inheritance?

613


Is c++ pass by reference or value?

567


What are member functions used in c++?

548


Which of the following is evaluated first: a) && b) || c) !

1799


Write a program in C++ for Fibonacci series

655