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 is helper in c++?

1094


Carry out conversion of one object of user-defined type to another?

1051


Write a program using display() function which takes two arguments.

1088


Explain the advantages of using friend classes.

1174


Is c++ primer good for beginners?

1047


What is iostream in c++ used for?

1039


Explain what are accessor methods?

1130


What are c++ redistributables?

1044


write a programme to get a character and thier ASCII value

3050


What does ctime() do?

1144


What is the this pointer?

1128


What will strcmp("Astring", "Astring"); return a) A positive value b) A negative value c) Zero

1106


Explain how to initialize a const member data.

1042


Do you know the use of vtable?

1136


How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

1098