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
How do I tokenize a string in c++?
What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?
How does com provide language transparency?
What is an arraylist c++?
what do you mean by volatile variable?
What is c++ prototype?
Incase of a function declaration, what is extern means?
Which function should be used to free the memory allocated by calloc()?
What do you mean by function overriding & function overloading in c++?
When can I use a forward declaration?
What is the difference between equal to (==) and assignment operator (=)?
What is setbase c++?
If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?
Who made c++?
Explain the register storage classes in c++.