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 unique features of C++.
What are the advantages of c++ over c?
What is main function in c++ with example?
If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?
What is recursion?
Can you please explain the difference between overloading and overriding?
Who discovered c++?
What are move semantics?
Does c++ have finally?
What are the uses of pointers?
What are disadvantages of pointers?
Is c or c++ more useful?
What does namespace mean in c++?
How do I make turbo c++ full screen?
What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?