Add chapter 10

It's probably faster to do a foreach loop with a printf to format and print the output, rather than sprintfing and printing separately.