Loops

add homework 18, 19 and 20.