A mother buys a box of sweets. She kept 1/3 of the sweets and divided the rest between her 3 children. The eldest got 8 sweets while the youngest got half as many. If there are 27 pieces of sweets in the box, how many sweets did the second child gets?
The mother kept 27 x 1/3 = 
<gadget id="calculator">27*1/3</gadget>
<output>9</output>
9 pieces of sweets.
So there were 27 - 9 = 
<gadget id="calculator">27-9</gadget>
<output>18</output>
18 sweets that were divided between the 3 children.
The youngest child got 8/2 = 
<gadget id="calculator">8/2</gadget>
<output>4</output>
4 sweets.
So the eldest and the youngest got a total of 8 + 4 = 
<gadget id="calculator">8+4</gadget>
<output>12</output>
12 sweets.
Therefore, the second child gets 18 - 12 = 
<gadget id="calculator">18-12</gadget>
<output>6</output>
6 sweets.

<result>6</result>