int random; random=rand(); if(random<90) var[x][y]=2; else var[x][y]=4;
How can I generate 2 at a percentage of 90% and 4 at 10 %?
Aucun commentaire:
Enregistrer un commentaire