write program for palindrome

Answer Posted / felix

#include<stdio.h>
#include<conio.h>
void main()
{
int n,s=0,m;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(m==n)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}

Is This Answer Correct ?    242 Yes 354 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

To what does “event-driven” refer?

615


why is iostream::eof inside a loop condition considered wrong?

596


Can recursive program be written in C++?

636


What are files in c++?

595


Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300

1793






What things would you remember while making an interface?

566


What is a class template?

593


What is purpose of new operator?

601


What is binary object model?

605


Why do we use pointers in c++?

596


Explain the purpose of the keyword volatile.

638


what is scupper?

1895


What are static variables?

619


Eplain extern keyword?

566


What is the use of :: operator in c++?

604