You're making a newbie mistake and that's to first produce a pile of code and then try to make it work. Instead use a technique called Stepwise Refinement. Enter code in small steps and make sure it...