You had $24 to spend on three notebooks. After buying them you had $12. How much did each notebook cost?

(also show how you found out the answer))​