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 can I disable the "echo" feature?

613


What is setbase c++?

631


What is an associative container in c++?

556


What are the uses of c++ in the real world?

569


What is the history of c++?

561






Can I create my own functions in c++?

605


What are the new features that iso/ansi c++ has added to original c++ specifications?

588


What do you mean by storage classes?

801


What is & in c++ function?

597


Explain stack unwinding.

643


What is the benefit of learning c++?

555


what is multi-threading in C++?

617


What are friend classes? What are advantages of using friend classes?

613


Eplain extern keyword?

567


Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?

1745