If you've been to the euler project you know how fun it can be. There are many solutions to the plethora of problems presented on the site. However, mine are not the most elegant but they get the job done as a non-verbose overly engineered self contained program. Essentially, I was focusing on good object oriented (OO) design and less on beautification. Below is the source code and if downloaded it should work as a self contained C++ program, albeit you can definitely trip it up if you're trying.
"If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000." -projectEuler.net-
0 Comments
Leave a Reply. |