write program for palindrome
Answer Posted / lakshmi narayana
#include<stdio.h>
main()
{
int n,s=0,m;
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
int r=n%10;
s=s*10+r;
n=n/10;
}
if(s == m) // This is important step
printf("the no is palindrome\n");
else
printf("no is not palindrome\n");
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which software is used to run c++ program?
Which format specifier is used for printing a pointer value?
What is the advantage of an external iterator.
When do we run a shell in the unix system? How will you tell which shell you are running?
Give example of a pure virtual function in c++?
Describe the process of creation and destruction of a derived class object?
What are the various compound assignment operators in c++?
how to connect with oracle 9i with server in socket program in c/c++
How does com provide language transparency?
What are activex and ole?
write a c++ program to create class student having datamember name,Roll_no,age,and branch intilcization all the member using constructor print the all the details on the screen.
What are dynamic type checking?
Explain the concept of memory leak?
What is the difference between C and CPP?
What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.