So my task is to create an array with rand() function. Every time this program runs, asks the size of the array, and how much is the frequency of the 0 that will input in the array. For example on 5x5 array, the zeroes must take part the 80% of this array(but every time the frequency is different). I am not sure how to use the rand() function to solve that. Anybody have any idea how to solve it ?
Aucun commentaire:
Enregistrer un commentaire