lundi 31 août 2015

Filling a 2D array in C twice, first with one number in randomized positions and then fill the rest with randomized numbers

I'm totally lost here, i'm a C newbie and i'm just learning about 2D arrays and i got an assignment about making an array and filling it with -1 in random positions, and then filling the rest of it with random numbers from 0 to 100.

I've been trying different functions and i've created arrays but i can only completely fill them with random numbers.

My main problem is the first step, making it fill itself with -1 in random positions, where should i start? i've been searching but i cant find something that makes this. I'm asking out of desperation.




Aucun commentaire:

Enregistrer un commentaire