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 are the events occur in intr activated on interrupt vector table

1749


Can we use this pointer inside static member function?

1070


What is the syntax for a for loop?

1136


What relational operators if statements in c++?

1174


What is the auto keyword good for in c++?

1185


What is the difference between a definition and a declaration?

1063


What is iterator c++?

983


What is c++ manipulator?

983


You run a shell on unix system. How would you tell which shell are you running?

1164


What is the best way to declare and define global variables?

1316


What is lvalue?

1169


Do you know the problem with overriding functions?

1105


Is c++ the most powerful language?

1079


Define a nested class.

1074


What c++ library is string in?

1050