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 / syfith

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n,k,i,t,rev;
cout<<"enter your number = ";
cin>>n;
k=n;
while(t>0)
{
i=n%10;
rev=rev*10+i;
t=n/10;
n=n/10;
}
if(rev==k)
cout<<"it is a palindrome";
else
cout<<"it is not a palindrome";
getch();
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which one is a preferred language C or C++? Why?

1026


Discussion on error handling of C++ .

1068


Explain public, protected, private in c++?

961


Are c and c++ different?

937


What are destructors?

944


Explain the pure virtual functions?

1056


Which is the best c++ compiler for beginners?

1017


Difference between pass by value and pass by reference?

1089


What is c++ best used for?

1019


what are the decision making statements in C++? Explain if statement with an example?

1037


What type of question are asked in GE code writing test based on c++ data structures and pointers?

3926


How is data hiding achieved in c++?

1029


Will rust take over c++?

1004


What is ios flag in c++?

1130


What is the best c c++ compiler for windows?

999