Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Main where
- import qualified Random
- main :: IO ()
- main = do
- a <- randInt 0 100
- putStrLn $ show a
- -- generate random number between [lo, hi]
- randInt :: Int -> Int -> IO Int
- randInt x y = Random.getStdRandom (Random.randomR (x, y))
Add Comment
Please, Sign In to add comment