- every 5 minutes, the computer pick out a random number (which is <100, ie. 70), it prints out the number it picks.
- After it generate this number (ie. 70), it also tells that this number is picked to be in the sample.
- There will be 120 numbers get created from 7AM to 5PM. Out of 120 numbers, there will be only 12 numbers get pick to be the sample.
Here is what it should output:
- At 7:00 AM, number picked 70, count #1, number is picked. Sample #1
- At 7:05 AM, number picked 25, count #2, number is NOT picked.
- At 7:10 AM, number picked 30, count #3, number is NOT picked.
- At 7:15 AM, number picked 32, count #4, number is NOT picked.
.......
- At 10:45 AM, number picked 99, count #xx, number is picked. Sample #2
- At 10:50 AM, number picked 22, count #xx+1, number is picked. Sample #3
.....
- At 4:20 AM, number picked 55, count #1yy, number is picked. Sample #12
.....
.....
- At 5:00 PM, number picked 21, count #120, number is NOT picked.
As a note, all the time that it picks out the sample has to be random. The output has to be printed out has the number gets generated. The sample per 10-hr day has to be 12.
I get stuck at the part that how to pick out 12 numbers randomly in the 120-count set.
Thanks for helping.
GH