Qt Code:
int math[20][20],aux2,aux3; for(int i=0;i<40s;i++) { do{ aux2=int( rand()%20); aux3=int( rand()%20);} while(math[aux2][aux3]==0); math[aux2][aux3]=1; }To copy to clipboard, switch view to plain text mode
this should make me 40 of math's element to be 1...and it give @ 30-38 numbers....not exactly 40 ....why ???
("rand()" is working good...)
Bookmarks