$2.89 Just do the cost divided by the gallons and round up.
Yes thats a function, it passes the vertical line test!
He would have to pay $560 because if you take 20% off of the computer using the equation 1000 - (1000 * 0.20) you get 800. This means that the 30% coupon is applied to $800, so using the same template as the equation above, we can do 800 - (800 * 0.30) to get a final answer of 560.