Everything Phil said is spot on. It sounds like you aren't having trouble with the actual *programming*, but with *general problem solving* instead.

I don't mean that to sound insulting, and your...