Here’s the translation of the Go code example to Scala, formatted in Markdown suitable for Hugo:
Scala’s scala.util.Random package provides pseudorandom number generation.
To run the program, save it as RandomNumbers.scala and use scala:
Some of the generated numbers may be different when you run the sample.
Note that Scala’s Random class doesn’t have a direct equivalent to Go’s PCG (Permuted Congruential Generator). Instead, we’re using a simple seeded Random instance. The behavior might not be exactly the same as the Go example, but it demonstrates the concept of seeded random number generation.
See the scala.util.Random documentation for references on other random quantities that Scala can provide.