I'm new at this. I want to create an array of 16 elements. Let's say that my array is ReDim arr(15) as Integer and in that array I want to put the numbers from 1 to 16 but scrambled, for example arr(0) = 3, arr(5) = 8 and so on.
相关问题
- How to get the maximum of more than 2 numbers in V
- Faster loop: foreach vs some (performance of jsper
- Convert Array to custom object list c#
- Excel sunburst chart: Some labels missing
- pick a random item from a javascript array
相关文章
- Numpy matrix of coordinates
- why 48 bit seed in util Random class?
- PHP: Can an array have an array as a key in a key-
- Get column data by Column name and sheet name
- Accessing an array element when returning from a f
- How can I convert a PHP function's parameter l
- How to make a custom list deserializer in Gson?
- programmatically excel cells to be auto fit width
Here is some very lazy code:
Rnd generates a
single
from 0 to 1, multiply that by 16 and strip the decimal portion withInt
and it will give you a random number from 0 to 15.It isn't efficient, I wouldn't use this in production, but it'll do the job.
Hope this helps!
Give this a try: