Wrote problem 1c!