Skip to content

Instantly share code, notes, and snippets.

@hminaya
Created April 22, 2013 14:48
Show Gist options
  • Save hminaya/5435642 to your computer and use it in GitHub Desktop.
Save hminaya/5435642 to your computer and use it in GitHub Desktop.
Genera un archivo con numeros aleatorios dentro de un rango
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