diff options
-rw-r--r-- | exercises/functions/functions2/main.go | 17 | ||||
-rw-r--r-- | info.toml | 7 |
2 files changed, 24 insertions, 0 deletions
diff --git a/exercises/functions/functions2/main.go b/exercises/functions/functions2/main.go new file mode 100644 index 0000000..d3dab80 --- /dev/null +++ b/exercises/functions/functions2/main.go @@ -0,0 +1,17 @@ +// functions2 +// Make me compile! + +// I AM NOT DONE +package main + +import "fmt" + +func main() { + call_me(10) +} + +func call_me(num) { + for n := 0; n <= num; n++ { + fmt.Printf("Num is %d\n", n) + } +} @@ -47,3 +47,10 @@ mode = "compile" hint = """ The main function is calling another function that it expects to exist. It expects a function named `call_me` to exist and receive no arguments.""" + +[[exercises]] +name = "functions2" +path = "exercises/functions/functions2/main.go" +mode = "compile" +hint = """ +Function parameters need to have their types explicitly declared.""" |