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...

how to write palindrome program?

Answer Posted / arnab

#include<iostream.h>
#include<conio.h>
void main()
{ int num, num1, rem, rev=0;
cin>>num;
num1=num;
while(num!=0)
{
rem=num%10;
rev=rev*10+rem;
num=num/10;
}
if(num1==rev)
cout<<"yes the no. is pallindrome";
else
cout<<"no the no. is not pallindrome";
getch();
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how can a program be made to print the name of a source file where an error occurs?

1251


Describe dynamic data structure in c programming language?

1140


For what purpose null pointer used?

1117


What is the use of volatile?

1152


Is fortran still used today?

1150


Explain what is gets() function?

1121


What is difference between stdio h and conio h?

1439


Describe explain how arrays can be passed to a user defined function

1164


Why do we use namespace feature?

1121


Can you please explain the difference between strcpy() and memcpy() function?

1122


What is a function in c?

1684


What are the different types of control structures in programming?

1181


An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above

1218


What are the different types of pointers used in c language?

1103


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

1133