aspose file tools*
The moose likes Meaningless Drivel and the fly likes A Puzzle of Oranges Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Other » Meaningless Drivel
Bookmark "A Puzzle of Oranges" Watch "A Puzzle of Oranges" New topic
Author

A Puzzle of Oranges

Derek Grey
Ranch Hand

Joined: Feb 09, 2002
Posts: 204
Try solving this:
There is a Little Girl who sells fruits. One day she leaves her home to sell
her oranges. She sells half an orange more than half the number of oranges
in her basket to the person living in House number 1. Then again, she sells
half an orange more than half the number of remaining oranges to the person
living in House number 2. Then finally she sells half an Orange more than
half the number of remaining Oranges to the person living in House number 3.
She is finally left with no oranges in her Bag. She however manages to sell
these Oranges without cutting any Oranges. Can you tell me how many Oranges
did she have in her Basket when she left her house and how many did she sell
to each of the people living in House #1, House #2, & House #3.
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

Seven oranges when she left. Sold 4 to house 1, 2 to house 2, 1 to house 3.
Derek Grey
Ranch Hand

Joined: Feb 09, 2002
Posts: 204
Originally posted by Michael Ernest:
Seven oranges when she left. Sold 4 to house 1, 2 to house 2, 1 to house 3.

Perfect.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A Puzzle of Oranges