Created
April 22, 2013 14:48
-
-
Save hminaya/5435642 to your computer and use it in GitHub Desktop.
Genera un archivo con numeros aleatorios dentro de un rango
This file contains hidden or 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
file = File.open("seed.txt", "w") | |
20.times do | |
one = Random.rand(1...500000) | |
two = Random.rand(500000...2000000) | |
file.write("#{one} #{two}\n") | |
end | |
file.close unless file == nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment