Committing part of exercise 6 from chapter 9.
Merge branch 'master' of https://github.com/HenrikSamuelsson/c_primer_plus_solutions