Coursework 8

Problem 5c is for tough students.