Quantcast
Channel: Arduino Forum - Latest topics
Viewing all articles
Browse latest Browse all 15346

Picking a random order of 10 numbers

$
0
0

I have been banging my head against a wall trying to randomise the contents of an array without any number repeating.

randnumbe[10] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

I want to fill these 10 array variable positions with a random number between 1 and 10, and each number (1-10) is only used once.

Any ideas? Mine so far have failed miserably

5 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 15346

Trending Articles