write program for palindrome
Answer Posted / sanam baig
#include<stdio.h>
#include<conio.h>
void main()
{
int n,s=0,m,r;
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 ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the use of default constructor?
What is meant by const_cast?
Are there interfaces in c++?
Why we use #include conio h in c++?
Is c++ vector dynamic?
What is the use of turbo c++?
What is conditions when using boolean operators?
What is the difference between method overloading and method overriding in c++?
write a program that withdrawals,deposits,balance check,shows mini statement. (using functions,pointers and arrays)
What are the differences between malloc() and calloc()?
What is ctime c++?
Explain the difference between struct and class in terms of access modifier.
What is a manipulator in c++?
What is a .lib file in c++?
What are static variables?