Created
August 17, 2015 13:58
-
-
Save TakashiHarada/886b3ca4a12a6dc576de to your computer and use it in GitHub Desktop.
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 Data.Char | |
import System.IO | |
import System.Random | |
import System.Environment | |
numListToString :: [Int] -> String | |
numListToString [] = [] | |
numListToString (x:xs) = (show x) ++ "\n" ++ numListToString xs | |
main = do | |
args <- getArgs | |
gen <- getStdGen | |
-- putStrLn "Enter a number of Section" | |
-- n <- getLine | |
let n' = read (head args) :: Int | |
xs = take (n'*3) $ (randomRs (1,100) gen) :: [Int] | |
--mapM_ print xs | |
writeFile "randomPath.txt" (numListToString xs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment