aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--exercises/functions/functions2/main.go17
-rw-r--r--info.toml7
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)
+ }
+}
diff --git a/info.toml b/info.toml
index 753e7af..5a0f2e0 100644
--- a/info.toml
+++ b/info.toml
@@ -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."""