book version of maxmin.c

first commit for chapter 11! yay