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

What problems might the following macro bring to the application?

1050


What is the difference between global variables and local variable

1052


what are Access specifiers in C++ class? What are the types?

1220


What are vectors used for in c++?

1072


Function can be overloaded based on the parameter which is a value or a reference. Explain if the statement is true.

1110


Explain linked list using c++ with an example?

1082


What is a class definition?

1070


Can we use clrscr in c++?

1079


What is a class template?

1080


Am pass the 10000 records to target in target I will take commit interval 15000 when I was stop the work flow what will happened

1559


What is difference between array and vector in c++?

1025


What are features of c++?

1169


What is a c++ map?

1394


Is the declaration of a class its interface or its implementation?

1166


Is c++ slower than c?

1030