get-programming-with-go/rand.go
2018-10-30 08:11:47 -04:00

16 lines
195 B
Go

package main
import (
"fmt"
"math/rand"
"time"
)
func main() {
rand.Seed(time.Now().UnixNano())
var num = rand.Intn(10) + 1
fmt.Println(num)
num = rand.Intn(10) + 1
fmt.Println(num)
}