Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cgallagher/154310 to your computer and use it in GitHub Desktop.
Save cgallagher/154310 to your computer and use it in GitHub Desktop.
#generate an array of random numbers for a range
def ranGen(maxNum, quantity)
counter = 0
nums = Array.new
while counter < quantity
member = rand(maxNum)
nums << member
counter = counter + 1
end
return nums
end
indexes = ranGen(50, 8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment