From 7efe5d8b9630c746d1cb10963358f5d0744a687c Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Wed, 15 Mar 2023 18:08:34 +0100 Subject: [PATCH] Add a message at the beginning of the game --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 7182c0e..3ad0e03 100644 --- a/main.go +++ b/main.go @@ -1,11 +1,14 @@ package main import ( + "fmt" "math/rand" "os" ) func main() { - random := rand.Intn(100) + 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) }