write program for palindrome

Answer Posted / dude

#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(s == n) // This is important step
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}

Is This Answer Correct ?    199 Yes 137 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I tokenize a string in c++?

608


What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?

620


How does com provide language transparency?

605


What is an arraylist c++?

687


what do you mean by volatile variable?

586






What is c++ prototype?

589


Incase of a function declaration, what is extern means?

521


Which function should be used to free the memory allocated by calloc()?

590


What do you mean by function overriding & function overloading in c++?

602


When can I use a forward declaration?

624


What is the difference between equal to (==) and assignment operator (=)?

578


What is setbase c++?

625


If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?

669


Who made c++?

611


Explain the register storage classes in c++.

674