write program for palindrome
Answer Posted / madhupriya
#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(m==n)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How to declare a pointer to an array of integers?
If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?
What parameter does the constructor to an ofstream object take?
What is c++ flowchart?
What do the header files usually contains?
Define a conversion constructor?
How can you say that a template is better than a base class?
What are the two shift operators and what are their functions?
What is struct c++?
What is class in c++ with example?
What's the order in which the objects in an array are destructed?
What is time h in c++?
What is a string example?
In inline " expression passed as argument are evalauated once " while in macro "in some cases expression passed as argument are evaluated more than once " --> i am not getting it plz help to make me understand....
Discuss the possibilities related to the termination of a program before entering the mainq method?