From f9682e63d94b4f27db97ce7f31e5cabeb22664c9 Mon Sep 17 00:00:00 2001 From: MaurĂ­cio Antunes Date: Fri, 11 Nov 2022 20:08:28 -0300 Subject: feat: one more variables exercise --- exercises/variables/variables4/main.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 exercises/variables/variables4/main.go (limited to 'exercises/variables/variables4/main.go') diff --git a/exercises/variables/variables4/main.go b/exercises/variables/variables4/main.go new file mode 100644 index 0000000..dc38c85 --- /dev/null +++ b/exercises/variables/variables4/main.go @@ -0,0 +1,19 @@ +// variables4 +// Make me compile! + +// I AM NOT DONE +package main + +import "fmt" + +func main() { + x := 10 // Don't change this line + fmt.Printf("x has the value %d", x) + + if true { + x = "foo" + fmt.Println(x) + } + + fmt.Println(x) +} -- cgit v1.2.3-70-g09d2