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 / devunegi.negi

write program for palindrome in jdk........


import java.i.*;

class palindroame

{
public static void main(String args[])throws IEXception

int n,s,rev,m;
n=s
BufferedReader br =new BufferedReader(new InputStreamReader
(System.in));

System.out.println("Enter the Digit=");
s=Integer.parseInt(br.readLine());

While(s!=0)

{
m=s%10;

rev=(10*rev)+m;
s=s/10;
}
if(rev==n)
System.out.println("This number is Palindrome");

else
System.out.println("This number is Not palindrome");
}

Is This Answer Correct ?    13 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the vectors in c++?

984


What is the best way to take screenshots of a window with c++ in windows?

993


Will a catch statement catch a derived exception if it is looking for the base class?

962


Specify different types of decision control statements?

800


What is a unnitialised pointer?

1013


What problems might the following macro bring to the application?

981


what is VOID?

1009


Explain the operation of overloading of an assignment operator.

1106


What is the difference between map and hashmap in c++?

1038


What are the effects after calling the delete this operator ?

990


Explain abstraction.

1033


How many static variables are created if you put one static member into a template class definition?

978


What is c++ try block?

992


Which programming language is best to learn first?

1008


What is a tuple c++?

961