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
Is c++ a float?
Why would you use pointers in c++?
What is a linked list in c++?
What is the difference between object-oriented programming and procedural programming?
How do you write a function that can reverse a linked-list?
What is a class definition?
what are the iterator and generic algorithms.
What is the use of turbo c++?
What is the c++ programming language used for?
What is an iterator class in c++?
How many types of classes are there in c++?
write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;
What flag means?
What are the types of array in c++?
Can comments be longer than one line?