Can you make a list of the steps the program should take to solve the problem?
Given a list of the steps, then go through the code to see if it is doing the right thing in the correct order.
Add...