reference: C ALL IN ONE DESK REFERENCE pg 40.
The code below creates random numbers and displays them. It keeps a track of the numbers generated so they are not repeated. Similar to the lotto
The trouble I'm having is with the do while loop specifically while(numbers[ball]). Does it mean to say while numbers[ball]=1 it should repeat ?
Also, lets say a random number 20 is created. What does ball=rand()%RANGE be equal to? 0.4?
#define RANGE 50
#define BALLS 6
//initialize the array
numbers[c]=0; //all 50 elements are initialized to 0
printf("Press Enter to pick this week's numbers:");
puts("Here they come");