Commit a2ff0e27 authored by Lucas Fabrizio Di Salvo's avatar Lucas Fabrizio Di Salvo
Browse files

resolucionHaskell problem001

parent 23b25d76
{-
"Multiples of 3 and 5"
Problem 1
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.
-}
let result = sum [x | x <- [1..999], x `mod` 3 == 0 || x `mod` 5 == 0]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment