Fix typo on random numbers example
This commit is contained in:
parent
a4d9d2f5db
commit
7dde60ce97
@ -47,4 +47,8 @@ func main() {
|
|||||||
fmt.Print(r2.Intn(100), ",")
|
fmt.Print(r2.Intn(100), ",")
|
||||||
fmt.Print(r2.Intn(100))
|
fmt.Print(r2.Intn(100))
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
|
s3 := rand.NewSource(42)
|
||||||
|
r3 := rand.New(s3)
|
||||||
|
fmt.Print(r3.Intn(100), ",")
|
||||||
|
fmt.Print(r3.Intn(100))
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ $ go run random-numbers.go
|
|||||||
81,87
|
81,87
|
||||||
0.6645600532184904
|
0.6645600532184904
|
||||||
7.123187485356329,8.434115364335547
|
7.123187485356329,8.434115364335547
|
||||||
|
0,28
|
||||||
5,87
|
5,87
|
||||||
5,87
|
5,87
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user