write program for palindrome
Answer Posted / dinakar
#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 == m) // This is important step
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
Is This Answer Correct ? | 242 Yes | 88 No |
Post New Answer View All Answers
What are the advantages of early binding?
Write a program to find the Fibonacci series recursively.
Write a program which uses functions like strcmp(), strcpy()? etc
What is protected inheritance?
Why is c++ called oops?
By using c++ with an example describe linked list?
Discuss the possibilities related to the termination of a program before entering the mainq method?
What does return 0 do in c++?
What does ios :: app do in c++?
What is the use of object in c++?
What are the comments in c++?
What flag means?
Refer to a name of class or function that is defined within a namespace?
What is the difference between global variables and static varables?
Why null pointer is used?