write program for palindrome

Answer Posted / dharm

#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==s)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why was c++ created?

767


Which should be more useful: the protected and public virtuals?

756


What is searching? Explain linear and binary search.

764


What are arithmetic operators?

734


What are iterators in c++?

763






Write a program to find the Factorial of a number

782


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create

2263


How does list r; differs from list r();?

878


Evaulate: 22%5 a) 2 b) 4 c) 0

847


When should we use container classes instead of arrays?

773


What is atoi in c++?

793


What is a stack? How it can be implemented?

884


What is an overflow error?

813


Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?

814


What is constructor c++?

848