|
modulo operator?
ok how do you use this... I never learned this in math..ever.
I need to use it in programming to do something..
I have to take in 4 numbers into an array.. 4 "random" numbers between the values [0,5]...
so I have to "mod" the random numbers I think
that and I need to figure out why my array isnt taking in 4 values.
"
int i;
int number;
board[4];
srand(time(NULL));
for(i=0;i<4;i++)
board[i]=0;
for(i=0;i<5;i++)
{
board[number] = rand()%10;
}
"
|