package main import ( "fmt" "time" "math/rand" ) func main() { r := rand.New(rand.NewSource(time.Now().UnixNano())) for i:=0; i<20; i++ { fmt.Println(r.Intn(1000)) } }原文链接:https://www.f2er.com/go/191351.html
package main import ( "fmt" "time" "math/rand" ) func main() { r := rand.New(rand.NewSource(time.Now().UnixNano())) for i:=0; i<20; i++ { fmt.Println(r.Intn(1000)) } }原文链接:https://www.f2er.com/go/191351.html