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 / saurav sadangi

#include<stdio.h>

int main(){
int m,n,sum=0,r;
printf("Enter n: ");
scanf("%d",&n);
m=n;
while(n>0){
r=n%10;
sum=sum*10+r;
n=n/10;
}
if(sum==m){
printf("The no %d is pallendrom\n",m);
}
else{
printf("The no %d is not pallendrom\n",m);
}
system("PAUSE");
return 0;
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe Trees using C++ with an example.

1091


How can an improvement in the quality of software be done by try/catch/throw?

1007


How did c++ get its name?

982


What is meant by entry controlled loop?

1062


What is constructor c++?

1067


Define copy constructor.

1061


How come you find out if a linked-list is a cycle or not?

989


What is vectorial capacity?

1119


Why should we use null or zero in a program?

976


Why is main function important?

1054


Why null pointer is used?

999


Where and why do I have to put the "template" and "typename" keywords?

978


What is the use of bit fields in structure declaration?

927


Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?

1021


What are register variables?

1075