Answer in C# using LINQ.
.Where(i => i % 3 == 0 || i % 5 == 0)
Aggregate((acc, n) => acc + n))
Source & Tests on Github.
short AND legible!
Thanks Joe :)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.