Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!

# A Puzzle of Oranges

Derek Grey
Ranch Hand
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
Posts: 7292
Seven oranges when she left. Sold 4 to house 1, 2 to house 2, 1 to house 3.

Derek Grey
Ranch Hand
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.