Smatchcube's website 🌍

Exercise 3.6

We need to create the rand-update procedure to test if our solution works, we will follow the footnote 6 to write such a procedure. This is called a linear congruential generator.

Let’s see if everything work as expected:

As expected the sequence of pseudo-random numbers is exactly the same if we use the same initial value (seed).