how to write palindrome program?

Answer Posted / shweta

when we do reverse any no then we find a new no and this
no is equal to our privous no,which is called palindrom no.
by program
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int n,m,sum=0,l;
printf("enter any no");
scanf("%d",&n);
while(n>0)
{
m=n%10;
sum=sum*10+m;
n=n\10;
}
if(n==l)
{
printf("no is palindrom");
}
else
{
printf("no is not palindrom");
}
getch();
}

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain zero based addressing.

613


What is echo in c programming?

565


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

3509


What is array of structure in c programming?

759


Explain do array subscripts always start with zero?

767






What are the two types of functions in c?

576


What are the 4 types of programming language?

594


How to compare array with pointer in c?

627


What are pointers?

637


What is mean by data types in c?

558


Can a function argument have default value?

678


Do you have any idea how to compare array with pointer in c?

611


Combinations of fibanocci prime series

1118


if p is a string contained in a string?

1413


Are enumerations really portable?

600