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 / noor alam khan

#include<iostream.h>
#include<conio.h>

main()
{
int n, reverse = 0, temp;

cout<<"Enter a number to check if it is a palindrome or
not\n"<<endl;
cin>>n;

temp = n;

while( temp != 0 )
{
reverse = reverse * 10;
reverse = reverse + temp%10;
temp = temp/10;
}

if ( n == reverse )
cout<<n<<" is a palindrome number \n"<<endl;
else
cout<<n<<"is not a palindrome number"<<endl;

return 0;
}

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the properties and principles of oop.

1068


Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.

1093


List the features of oops in c++?

1095


What does std :: flush do?

1190


Can I have a reference as a data member of a class? If yes, then how do I initialise it?

1281


What is copy constructor? Can we make copy constructor private in c++?

1130


Why c++ is so important?

1139


What are the classes in c++?

1156


Why would you use pointers in c++?

1215


Is nan a c++?

1205


Is rust better than c++?

1171


When can I use a forward declaration?

1143


What is this pointer in c++?

1487


What do you mean by overhead in c++?

1142


What is the difference between ++ count and count ++?

1198