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

#include<stdio.h>
#include<conio.h>
int main()

{
long int n,s=0,m,r;
printf("enter any no");
scanf("%ld",&n);
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(m==s)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does namespace mean in c++?

1078


What are references in c++?

1142


Explain one method to process an entire string as one unit?

1591


Explain selection sorting?

1090


What is the history of c++?

1081


what is C++ exceptional handling?

1180


What is pointer -to-members in C++? Give their syntax?

1031


Write about the role of c++ in the tradeoff of safety vs. Usability?

1075


What are separators in c++?

1093


What are function prototypes?

1248


When we use Abstract Class and when we use Interface?where we will implement in real time?

2187


What is this weird colon-member (" : ") syntax in the constructor?

1029


Write a program to concatenate two strings.

1096


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

1037


Which programming language should I learn first?

1104