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 / gaurav joshi garur (bageshwar)

#include<stdio.h> main()
{
int n, reverse = 0, temp; printf("Enter a number to check if it is a
palindrome or not\n");
scanf("%d",&n); temp = n; while( temp != 0 )
{
reverse = reverse * 10;
reverse = reverse + temp%10;
temp = temp/10;
} if ( n == reverse )
printf("%d is a palindrome number.\n", n);
else
printf("%d is not a palindrome number.\n",
n); return 0;
}

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you create a virtual copy constructor?

1081


Does c++ have foreach?

1045


What are libraries in c++?

1059


Explain how we implement exception handling in c++?

1048


Do vectors start at 0 c++?

1026


what Is DCS ? what i will get benefit when i did?

2353


What are guid?

1238


How is data hiding achieved in c++?

1075


What kind of jobs can I get with c++?

1112


What are pointer-to-members? Explain.

1137


What is the return value of the insertion operator?

1126


What is the correct syntax for inheritance a) class aclass : public superclass b) class aclass inherit superclass c) class aclass <-superclass

1184


How do you sort a sort function in c++ to sort in descending order?

984


Does a derived class inherit or doesn't inherit?

1085


What is the best c++ compiler?

1142