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 / gunajit bhuyan (ulubar, guwaha

void main()
{
int n,num,digit,sum,rev;
printf("input a number to check for palindrom\n");
scanf("%d",&n);
n=num;
do
{
digit=num%10;
sum+=digit;
rev=rev*10+digit;
num/=10;
while (num!=0);
printf("sum of the digits of the number is =%d",sum);
printf("Reverse of the number is =%d",rev);
if(n==rev)
printf("this number is palindrom");
else
printf("this number is not palindrome");
getch();
}

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a node class in c++?

1024


When do we run a shell in the unix system?

1019


What is math h in c++?

1095


Explain register storage specifier.

980


What is meant by the term name mangling in c++?

906


What is the difference between ++ count and count ++?

1084


Evaulate: 22%5 a) 2 b) 4 c) 0

1035


What are the new features that iso/ansi c++ has added to original c++ specifications?

1064


What is an iterator?

1140


Do class method definitions?

984


Should I learn c++ c?

1000


What is the function of I/O library in C++ ?

1116


What is pointer to array in c++?

1079


Write bites in Turbo c++ Header ("Include") Files.

1205


Why do we need templates?

947