book version of planet.c
finished problem 1
finished problem 18
finished problem 4
finished problem 5