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 is the difference between linear list linked representaion and linked representation? what is the purpose of representing the linear list in linked represention ? is it not avoiding rules of linear represention?

2359


Implement stack operations with pointers with appropriate exception checks.

981


Is there any function that can skip certain number of characters present in the input stream?

1070


What is a try block?

1074


Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].

1459


Write a program to find the reverse Fibonacci series starting from N.

1276


Who invented turbo c++?

1072


What is a storage class? Mention the storage classes in c++.

1026


Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);

1060


What are the types of array in c++?

1168


Why are arrays usually processed with for loop?

1237


How to give an alternate name to a namespace?

1088


Is c++ vector dynamic?

1131


What does h mean in maths?

1218


What is a manipulative person?

1021