gordon the light
Newbie level 4
I have a problem with the random number generator function with MPLAB c programming.
We use rand() to generate 2 numbers, but the 1st number is generated randomly in odd sequence and the other number is generated randomly in even sequence. The number is from 0-7. This is our code:
i=rand();
startcount=i%8;
j=rand();
lastcount=j%8;
We use rand() to generate 2 numbers, but the 1st number is generated randomly in odd sequence and the other number is generated randomly in even sequence. The number is from 0-7. This is our code:
i=rand();
startcount=i%8;
j=rand();
lastcount=j%8;