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

What do you mean by a template?

1033


why and when we can declar member fuction as a private in the class?

2035


What is a Default constructor?

1516


What are the new features that iso/ansi c++ has added to original c++ specifications?

1085


what is C++ exceptional handling?

1110


What is late binding c++?

936


What is the type of this pointer in c++?

1023


What is the main use of c++?

1072


Write a code/algo to find the frequency of each element in an array?

1061


Tell me can a pure virtual function have an implementation?

981


What is the full form of ios?

995


What is virtual destructor ans explain its use?

1086


Are iterators pointers?

1109


What does getch() do according to the ANSI C++ standard a) Reads in a character b) Checks the keyboard buffer c) Nothing in particular (Its not defined there)

1011


Show the declaration for a static member variable.

967