mirror of
https://github.com/Crocmagnon/gopher-the-number.git
synced 2024-09-07 20:57:36 +02:00
14 lines
230 B
Go
14 lines
230 B
Go
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)
|
|
}
|