It is explained here: https://golang.org/pkg/math/rand/
On Wed, Mar 14, 2018 at 11:26 AM, Andrea Alessandrini <ndr...@gmail.com> wrote: > I wrote this simple code > > package main > import ( > "fmt" > "math/rand" > ) > func main() { > for i := 0; i < 6; i++ { > fmt.Println("My favorite number is", rand.Intn(100)) > fmt.Println("My favorite number is", rand.Int()) > } > } > > > and I run it in my pc or in a web application > (https://tour.golang.org/basics/1 ) > > For each application I got the same result : > always: > >> $ go run 00_random.go >> My favorite number is 81 >> My favorite number is 8674665223082153551 >> My favorite number is 47 >> My favorite number is 4037200794235010051 >> My favorite number is 81 >> My favorite number is 6334824724549167320 >> My favorite number is 25 >> My favorite number is 1443635317331776148 >> My favorite number is 56 >> My favorite number is 2775422040480279449 >> My favorite number is 94 >> My favorite number is 7504504064263669287 > > > > It seams i should reset the memory, but I don't know how... > > Andrea > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.