Made this posting sometime ago but I’ve been forgetting to actually post it. When I was looking up some information on Scala I found a great video tutorial on youtube made by MadocDoyu, which can be found here. In part of the video he introduces the Project Euler, this project seems really interesting. I plan on solving problems time to time using many of the languages I have looked at. I’m hoping this will keep my skills in these languages up to date.
Here is the first problem,
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.
and here is the code to solve it,
If you want to see how to solve this with Scala check out MadocDoyu’s videos. They are really great to watch!
Based on the reply from md2perpe on Github there is a more mathematical way to solve this problem.