Solve problem 7,Allen