#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    93
    Rep Power
    5

    Generate random numbers without using an array?


    Figured it out.
    Last edited by ide; August 14th, 2017 at 02:25 PM.
  2. #2
  3. Lazy Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,335
    Rep Power
    9645
    I can't figure out how your ideas are relevant because they both use arrays. I also can't figure out how you expect to not use an array at all, or even why you might not want one.

    Regardless, the for loop is the answer. range + shuffle + array slice is not random for any value of x > 1.
  4. #3
  5. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Caro, Michigan
    Posts
    14,780
    Rep Power
    4536
    Originally Posted by requinix
    I can't figure out how your ideas are relevant because they both use arrays.
    lol... exactly.
    -- Cigars, whiskey and wild, wild women. --

IMN logo majestic logo threadwatch logo seochat tools logo