diff options
author | MaurĂcio Antunes <mauricio.abreua@gmail.com> | 2022-11-12 08:09:30 -0300 |
---|---|---|
committer | MaurĂcio Antunes <mauricio.abreua@gmail.com> | 2022-11-12 08:09:30 -0300 |
commit | ba5c0dc737976d6e20b4f2a544d8bfdfb07a4939 (patch) | |
tree | f870ff54b8e29fc6c79adc41ae1ad947998837a9 | |
parent | bf27423c7bc686211f8eb7d4092c979a609dff67 (diff) |
feat: add one more functions exercise
-rw-r--r-- | exercises/functions/functions3/main.go | 17 | ||||
-rw-r--r-- | info.toml | 7 |
2 files changed, 24 insertions, 0 deletions
diff --git a/exercises/functions/functions3/main.go b/exercises/functions/functions3/main.go new file mode 100644 index 0000000..6746570 --- /dev/null +++ b/exercises/functions/functions3/main.go @@ -0,0 +1,17 @@ +// functions2 +// Make me compile! + +// I AM NOT DONE +package main + +import "fmt" + +func main() { + call_me() +} + +func call_me(num int) { + for n := 0; n <= num; n++ { + fmt.Printf("Num is %d\n", n) + } +} @@ -54,3 +54,10 @@ path = "exercises/functions/functions2/main.go" mode = "compile" hint = """ Function parameters need to have their types explicitly declared.""" + +[[exercises]] +name = "functions3" +path = "exercises/functions/functions3/main.go" +mode = "compile" +hint = """ +When a function expect arguments, you must pass values to them.""" |