write program for palindrome
Answer Posted / sowmya
#include,studio.h>
#include<conio.h>
void main()
{
int num,mod,rev=0;
clrscr();
printf("Enter any no:");
scanf("%d",&n);
while(n>=0)
{
mod=n%10;
rev=rev*10+mod;
n=n/10;
}
if(rev=n)
{
printf("palindrome");
}
else
{
printf("not palindrome");
}
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What do you mean by global variables?
Write a code/algo to find the frequency of each element in an array?
What is private inheritance?
In c++, what is the difference between method overloading and method overriding?
Can I uninstall microsoft c++ redistributable?
What is an undefined behavior and sequence points
If dog is a friend of boy, is boy a friend of dog?
What is a dll entry point?
How does c++ structure differ from c++ class?
what is pre-processor in C++?
What do you understand by pure virtual function? Write about its use?
Explain the pure virtual functions?
What is the advantage of c++ over c?
What is the difference between public and private data members?
Write syntax to define friend functions in C++.