Question 998396
gas costs p dollars per gallon.
the tank has a capacitgy of 16 gallons
the gas gauge reads g gallons.
the number of gallons need to fill the tank is 16 - g.
at p dollars per gallon, the total price is equal to p * (16 - g).


for example.
suppose g is 10 gallons and p is $1.00 a gallon.
the number of gallons required to fill the tank is 16 - 10 = 6.
6 * $1.00 per gallon is $6.00 dollars.