mirror of
https://github.com/Crocmagnon/gopher-the-number.git
synced 2024-11-12 19:23:53 +01: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)
|
|
}
|