fork download
  1. fact :: Integer -> Integer
  2. fact n = if n == 0 then 1 else n * fact (n - 1)
  3.  
  4. main = do
  5. putStrLn "n <- "
  6. n <- readLn :: IO Integer
  7. print $ fact n
Success #stdin #stdout 0s 5284KB
stdin
100
stdout
n <- 
93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000