Here, we will demonstrate the use of the rand.Seed() function. The rand.Seed() function is used to set a seed value to generate random numbers. If the Seed value is the same then rand.Intn() function will generate the same series of random numbers. If we change the seed value then it will generate different series of random numbers.
Golang program to demonstrate the rand.Seed() function
belongs to collection: Golang math/rand Package Programs
total answers (1)