Cody goes to the store and buys $40 worth of stuff.  The taxes were 5%.  After taxes, he got an $8 discount.  Cody and his friend split the final price equally. How much did Cody pay?
The taxes were 40*.05=$
<gadget id="calculator">40*.05</gadget>
<output>2</output>
2.
So the price was 40+2=$
<gadget id="calculator">40+2</gadget>
<output>42</output>
42.
He got a discount so the price he paid was 42-8=$
<gadget id="calculator">42-8</gadget>
<output>34</output>
34.
Since he paid half his price was 34/2=$
<gadget id="calculator">34/2</gadget>
<output>17</output>
17.

<result>17</result>