If you have a random() that returns integers instead of a float just use mod instead of the multiply. The default random() in many systems may be slightly biased but that isn't its biggest problem and why I
want the lottery officials to use my code.
The proposed generation scheme is of course entirely unusable. In addition to any possible bias of the random() function (that wouldn't be very difficult to overcome), it has other grave problems: first, no matter how much entropy the PRNG is seeded with, the entropy used for generating the output set is limited by the PRNG's internal state size. In other words, depending on that size, some outputs may be impossible to generate at all, even if the PRNG is initially fed gigabits of entropy.
Secondly, and most importantly, the amount of entropy that the PRNG is seeded with is alarmingly insufficient. Its only source is the date and time of generation and the number of loop cycles before a key is pressed. The date for a draw is usually given, so has zero entropy. The time, if counted in minutes, would always have less than 11 bits of entropy - and most likely much less than that: if the draw is always generated at the same time, for example, it would have zero entropy. I see that the time is also printed out, perhaps with the hope of being made public, for the attacker's further convenience. As for the number of loop cycles before a key is pressed, the operator is instructed to count to ten before pressing a key, apparently in order to keep the entropy as low as possible. If the operator's timing of counting to ten fluctuates in something like a half second interval, and the system can compute the random() function a million times per second, the entropy would be less than 19 bits.
As the Danish lotto would require at least 23 bits of entropy even if the PRNG was flawless, the proposed scheme would fail dramatically. Of course, I have no doubt that it was intentionally designed to contain these flaws, and no competent lottery official, by definition, would ever use something like that.