File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programming Diversions and the fly likes equal measures Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "equal measures" Watch "equal measures" New topic
Author

equal measures

HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
A recipe calls for exactly 2 litres of liquid.
You only have 2 jugs - a 5 litre and 8 litre jug.
How do you measure 2 litres exactly ?
regards
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Fill the 5, dump into 8.
Fill the 5, pour into 8 until 8 is full.
5 contains 2 liters.


[Jess in Action][AskingGoodQuestions]
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404

Are fireflies flies ?

regards
achit bhatnagar
Greenhorn

Joined: Sep 09, 2003
Posts: 8
1.fill 5 liter jug
2. transfer liquid to 8 liter jug
3.fill 5 liter jug again
4. transfer liquid to 8 liter jug ( it has only 5 liter)
5. you will have 2 liters remaining in 5 liter jug
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404

What is one twentieth of one half of one tenth of 10,000 ?
regards
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
25 soft bodied beetles!
regards
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
Actually, the question could have been :

Q: What is one twentieth of one half of one tenth of 10,000 fireflies?
A: 25 soft bodied beetles.

regards
 
jQuery in Action, 2nd edition
 
subject: equal measures