Wednesday, March 16th, 2011
Project Euler: Problem1/Variation2 – Add all the natural numbers below one thousand that are multiples of 3 or 5
My previous post contained my first variation for solving Problem 1 of Project Euler. A basic loop was intentionally used to illustrate a brute force method of determining the answer. The solution is easy to understand and the code is very simple. For Variation 2, I decided to simply refactor Variation 1 so that it [...]