10/23/2010

Project Euler - Problem 1

that was so easy :)

import System.IO
main = do
putStrLn $ show $ sum $ filter judge [1..999]
judge a | a `mod` 3 == 0 || a `mod` 5 == 0 = True
| otherwise = False
view raw gistfile1.hs hosted with ❤ by GitHub

No comments:

Post a Comment