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

What is the two main roles of operating system?

506


an operation between an integer and real always yeilds a) integer result b) real result c) float result

699


Why is "using namespace std;" considered bad practice?

644


By using c++ with an example describe linked list?

591


What is the maximum value of a unsigned char a) 255 b) 256 c) 128

622






Differentiate between realloc() and free().

588


What is an adjust field format flag?

638


What is static in c++?

586


What is oops in c++?

580


What is atoi in c++?

558


What is the importance of mutable keyword?

572


What is a null object in c++?

625


which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?

707


What is ostream in c++?

561


What is the iunknown interface?

672