Dan had $ 3 left with him after he bought a candy bar. If he had $ 4 at the start how much did the candy bar cost?
Let's say the price of the candy bar is $x.

The price of the candy bar plus the sales tax is $1.18.

$x + $0.18 = $1.18

$x = $1