This one should hopefully having you thinking outside of the box. Without using any of the built in random functions of your chosen programming language or OS, create a function that returns a random number. Feel free to statically define seed numbers if it helps.
Comments:
David - 10 years, 5 months ago
This generator is simple and has a variable repetition cycle based on the seed, but it has good pseudo-randomness for a small number of values. It was good enough for von Neumann. I modified his algorithm by adding use of current time.
This next function is a bit of being silly.
reply permalink