guess.go 250 B

12345678910111213141516
  1. package main
  2. import (
  3. "fmt"
  4. "math/rand"
  5. "time"
  6. )
  7. func main() {
  8. seconds := time.Now().Unix()
  9. rand.Seed(seconds)
  10. target := rand.Intn(100) + 1
  11. fmt.Println("I've chosen a random number berween 1 and 100.")\
  12. fmt.Println("Can you guess it?")
  13. }