aboutsummaryrefslogtreecommitdiffstats
path: root/exercises/variables
diff options
context:
space:
mode:
Diffstat (limited to 'exercises/variables')
-rw-r--r--exercises/variables/variables4/main.go19
1 files changed, 19 insertions, 0 deletions
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)
+}