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

How does com provide language transparency?

1020


What does obj stand for?

1180


Does c++ have finally?

1047


What is an operator function? Describe the function of an operator function?

1157


Is it legal in c++ to overload operator++ so that it decrements a value in your class?

1068


What is the use of vtable?

1154


Difference between a homogeneous and a heterogeneous container

1147


How do you declare A pointer to a function which receives nothing and returns nothing

1242


What is increment operator in c++?

1027


What is long in c++?

1254


When can I use a forward declaration?

1110


What is searching?

1136


What is difference between array and vector in c++?

1037


What is the prototype of printf function?

1193


Which is not a valid keyword a) public b) protected c) guarded

1265