// Chapter 13 example: random numbers. // Run the file a few times and watch the numbers change. // Run with: go run exercises/13/03-random.go package main import ( "fmt" "math/rand" ) func main() { fmt.Println(rand.Float64()) // a decimal from 0.0 up to, but not including, 1.0 fmt.Println(rand.Intn(6) + 1) // whole number from 1 to 6 fmt.Println(rand.Intn(100) + 1) // whole number from 1 to 100 }