stuck on assignment

need to randomize an array an got stuck
closed account (STR9GNh0)
randomize the size of the array or the contents?
Try this. I used this a while back.
You randomly select two, different, elements of the array. Swap them.
Now put that code in a for loop and let it execute about a million times.
Works reasonably well.
Topic archived. No new replies allowed.