Add solution for J8FTRI chapter 3 exercise 8.