You can put this solution on YOUR website! hrs
------------------
You need to know the rate for
the car in miles/gallon
----------------------
Then you would do:
[ miles driven ] / [ miles/gallon ] = [ gallons used ]
the:
[ $3 / gallon ] x [ gallons used ] = [ dollars spent ]