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 how does flowchart help in writing a program?

855


A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

1903


What does typedef struct mean?

846


What is use of bit field?

1001


When the macros gets expanded?

1077


Why is c not oop?

727


What is a union?

793


regarding pointers concept

1802


What are file streams?

770


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

1723


Why is c used in embedded systems?

841


A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor

845


How many levels of pointers can you have?

923


Explain the red-black trees?

814


please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code

1909