add exercise 2-18 to 27

add exercise 2-18 to 27