Commits

Miki Tebeka  committed 4927e55

shorter

  • Participants
  • Parent commits 7ceb3d1

Comments (0)

Files changed (1)

 #
 # Answer: 233168
 
-function pred(n)
-    if (mod(n, 3) == 0) || (mod(n, 5) == 0)
-        return true
-    end
-    return false
-end
-
-
-println(sum(filter(pred, 1:999)))
+println(sum(filter(x -> x%3==0 || x%5==0, 1:999)))