Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write program for palindrome

Answer Posted / easwar

#include<stdio.h>
#include<conio.h>
void main()
{
int n,s=0,m,r;
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 == m) // This is important step
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}

Is This Answer Correct ?    172 Yes 77 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible for a member function to use delete this?

1021


How can we read/write Structures from/to data files?

1064


What is main function in c++ with example?

1139


Do you know what are pure virtual functions?

1105


What is constant in c++ with example?

1075


Explain stack & heap objects?

992


What is the difference between an external iterator and an internal iterator?

1047


What parameter does the constructor to an ofstream object take?

1003


What is purpose of new operator?

1016


What are the differences between java and c++?

1004


Carry out conversion of one object of user-defined type to another?

986


What is the basic of c++?

1018


What are the restrictions apply to constructors and destructors?

1028


What are c++ storage classes?

1044


What are formatting flags in ios class?

1191