write program for palindrome

Answer Posted / jamai partha

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

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which programming language's unsatisfactory performance led to the discovery of c++?

797


What is a Default constructor?

912


What is a driver program?

625


How to demonstrate the use of a variable?

639


Which bit wise operator is suitable for turning off a particular bit in a number?

641






What is data hiding c++?

597


What character terminates all character array strings a) b) . c) END

668


What is prototype for that c string function?

684


What is class in c++ with example?

566


What is polymorphism and its type in c++?

588


Difference between a homogeneous and a heterogeneous container

659


Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?

3694


What are the 4 types of library?

591


What are the restrictions apply to constructors and destructors?

641


How can you quickly find the number of elements stored in a static array?

632