Skip to content

Instantly share code, notes, and snippets.

@furu
Created June 10, 2017 18:46
Show Gist options
  • Save furu/66d068e60790499ea19ab187653acb17 to your computer and use it in GitHub Desktop.
Save furu/66d068e60790499ea19ab187653acb17 to your computer and use it in GitHub Desktop.
import System.Random
main :: IO ()
main = do
gen <- getStdGen
let (n, _) = randomR (1, 100) gen :: (Int, StdGen)
putStrLn $ "サイコロの結果は" ++ show n ++ "です!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment