Adam has 18 magnets. He gave away a third of the magnets, and he still had half as many magnets as Peter. How many magnets does Peter have?
Adam gave away 18/3 = <T>divide(18, 3)=6.0 magnets.
Adam had 18-6 = <T>subtract(18, 6)=12 magnets left.
Peter has 12*2 = <T>multiply(12, 2)=24 magnets.
