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 / amol

#include<stdio.h>
void main()
{
int p,q,r,s=0;
printf("\n Enter the number ::");
scanf("%d",&p);
q=p;
while(p>0)
{
r=p%10;
s=s*10+r;
p=p/10;
}
if(s==q)
{
printf("\n Entered number is palindrome...!!!");
}
else
{
printf("\n Enterde number is NOT a palindrome...!!!");
}
getch();
}

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what you know about c++?

1166


What can I use instead of namespace std?

1166


Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort

1055


How do I tokenize a string in c++?

1111


Please explain the reference variable in c++?

1095


What do you mean by public protected and private in c++?

1072


What is :: operator in c++?

1066


When should you use global variables?

1224


What is general format for a prototype?

1049


Explain the uses of static class data?

1117


Explain explicit container.

1094


What are the five basic elements of a c++ program?

1125


What are virtual functions in c++?

1192


Can we run c program in turbo c++?

1090


Why is c++ awesome?

1044