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

If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?

1154


Is c++ used anymore?

1136


Where is atoi defined?

1207


What is the purpose of templates in c++?

1088


What do you mean by friend class & friend function in c++?

1113


Out of fgets() and gets() which function is safe to use?

1195


How many types of modularization are there in c++?

1120


What is enum class in c++?

1320


How do I run c++?

1122


What is meant by iomanip in c++?

1290


How do I run a program in notepad ++?

1170


Is c# written in c++?

1032


Is there a c++ certification?

1103


Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list

1052


If dog is a friend of boy and boy is a friend of house, is dog a friend of house?

1064