swapped out "total" in "if (recieved < total)" to "toPay" because total was the wrong variable and would make you unable to pay x.00 kr for an item that was worth less than x.50. You should be able to because of the rounding.