Along the way, of course, they'll start to pick up all the concepts you wanted to teach them in the first place. What happened instead is that I burned out after a week. This is legal in C 6. Consider problem 10, for example, which is "Find the sum of all the primes below two million.
Skip the first primes and then take the first one you find. While I was writing the code I didn't check which numbers guarantee that they are not multiple's of prime's, and some other stuff concerning mathematics, for example the square roots. The AP curriculum ought to be a model for how to teach people to program.
And those concepts will stick because they learned them not in a vacuum, but in the service of a problem they were itching to solve. Sharing solutions to programming problems is easy, perhaps easier than sharing solutions to anything else, because the medium of information exchange -- text -- is the medium of action.
Add "Problem 2" ; ProblemList. That little narrative is an example of the mathematician's art: asking simple and elegant questions about our imaginary creations, and crafting satisfying and beautiful explanations.
And the solution was to do all the small numbers first.