Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
10 lines (7 sloc) 195 Bytes
import System.Environment
import Text.Printf
main = do
[d] <- map read `fmap` getArgs
printf "%f\n" (mean [1..d])
mean :: [Double] -> Double
mean xs = sum xs / fromIntegral (length xs)
Jump to Line
Something went wrong with that request. Please try again.