gopher-the-number/main.go

15 lines
230 B
Go
Raw Normal View History

2023-03-15 17:11:00 +01:00
package main
import (
"fmt"
"math/rand"
"os"
)
func main() {
max := 100
fmt.Printf("I've picked a number between 0 and %d. Can you guess it?\n", max)
random := rand.Intn(max)
LoopUntilFound(os.Stdout, os.Stdin, random)
}