write program for palindrome

Answer Posted / md.irfan(rourkela)

#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 ?    1204 Yes 747 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to access a variable of the structure?

752


Which operator cannot be overloaded c++?

761


How do you add an element to a set in c++?

723


Explain deep copy?

778


Explain about Garbage Collector?

848






What are multiple inheritances (virtual inheritance)?

772


What is stream and its types in c++?

742


What is a literal in c++?

721


Which field is used in c++?

806


When can I use a forward declaration?

787


What is meant by a delegate?

789


What do you mean by translation unit in c++?

921


How do I exit turbo c++?

764


What are move semantics?

852


Explain virtual destructor?

895