C # random number selection over a period of time

I have a list of employees (about 300 employees), each employee will put their fingerprint on the scanner, and I have to randomly select 20 employees between 7am and 7: 15am and for an arbitrary period of time.

The input shift of all employees is from 7:00 to 7:15, Human Resources should receive a warning exactly after they put their finger on the door scanner only for a randomnly selected employee, so the worker moves to the room for a special test.

For example, 300 employees will go within 15 minutes, I have to choose only 20, but I don’t want to be sequential, so maybe the first employee will be selected, but then the second will not, and the third will not, and perhaps the fourth will be selected again and so on. .d.

And there is one more difficult rule: after the employee is radonmo selected, the algorithm will have to wait 30 to 60 seconds (this should also be random) until a repeated logical operation is performed.

Here is an example from Excel of how it should work:

enter image description here

Any clue?

+5
source share

Source: https://habr.com/ru/post/1268825/


All Articles