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 is the difference between strcpy() and strncpy()?

1145


What are the two shift operators and what are their functions?

1092


Is swift a good first language?

1049


What is scope resolution operator in c++ with example?

1037


Describe the advantages of operator overloading?

1048


Can I learn c++ as my first language?

1113


What is the best c++ book?

1268


When are exception objects created?

1081


What is a local reference?

1191


How many types of classes are there in c++?

1047


How do you find out if a linked-list has an end?

1128


What do you understand by pure virtual function? Write about its use?

1006


What is an html tag?

1148


Why was c++ made?

1108


Can I learn c++ in a week?

1074