Wrote problem 3c.