Last active
January 29, 2019 17:51
-
-
Save reccanti/45dc145a6d3bba62fe8dc0d98fd6750e to your computer and use it in GitHub Desktop.
Get a random number between 1 and 100 in Haskell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.Random | |
main = do | |
x <- randomRIO (1,100) :: IO Int | |
putStrLn $ show x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment