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

What is the best c++ book for beginners?

1153


Define the operators that can be used with a pointer.

1061


What is & in c++ function?

1064


Why c++ is better than c language?

1020


Is it possible to get the source code back from binary file?

1367


Differentiate between a copy constructor and an overloaded assignment operator.

1087


What is flush programming?

1016


Is string an object in c++?

1154


How can you create a virtual copy constructor?

1087


What is the use of object in c++?

1105


What is pure virtual function? Or what is abstract class?

1063


When must you use a pointer rather than a reference?

1042


Why is polymorphism useful?

1076


What is c++ and its uses?

1229


Is multimap sorted c++?

1008