Tom needs to buy a new gaming system.  He trades in his super Nintendo for an original NES.  The SNES is worth $150 and the store gives him 80% of that value.  He gives $80 and gets back $10 change and a game worth $30.  How much was the NES on sale for?
He traded in the SNES for 150*.8=$
<gadget id="calculator">150*.8</gadget>
<output>120</output>
120.
Including the money he gave, he spent 120+80=$
<gadget id="calculator">120+80</gadget>
<output>200</output>
200.
He got 10+30=$
<gadget id="calculator">10+30</gadget>
<output>40</output>
40 in change.
So the NES cost 200-40=$
<gadget id="calculator">200-40</gadget>
<output>160</output>
160.

<result>160</result>