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

Why c++ is called oop?

1071


What is a tuple c++?

978


What is c++ and its features?

990


What is the auto keyword good for in c++?

1145


what is c++

2331


Why can templates only be implemented in the header file?

1076


If there are two catch statements, one for base and one for derived, which should come first?

1009


Differentiate between the manipulator and setf( ) function?

1130


What is difference between malloc()/free() and new/delete?

1137


how to connect with oracle 9i with server in socket program in c/c++

2303


What is the syntax for a for loop?

1095


Explain how a pointer to function can be declared in C++?

1017


How static variables and local variablesare similar and dissimilar?

1016


Is c++ map a hash table?

992


the maximum length of a character constant can be a) 2 b) 1 c) 8

1055