Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 27th, 2012  |  syntax: None  |  size: 0.16 KB  |  views: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import System.IO
  2.  
  3. main = do
  4.     putStrLn $ show $ sum $ filter judge [1..999]
  5.    
  6. judge a | a `mod` 3 == 0 || a `mod` 5 == 0  = True
  7.         | otherwise = False