diff options
Diffstat (limited to 'exercises/functions')
-rw-r--r-- | exercises/functions/functions1/main.go | 5 | ||||
-rw-r--r-- | exercises/functions/functions2/main.go | 3 | ||||
-rw-r--r-- | exercises/functions/functions3/main.go | 3 | ||||
-rw-r--r-- | exercises/functions/functions4/main.go | 3 |
4 files changed, 7 insertions, 7 deletions
diff --git a/exercises/functions/functions1/main.go b/exercises/functions/functions1/main.go index 9ad8e8a..cf47e93 100644 --- a/exercises/functions/functions1/main.go +++ b/exercises/functions/functions1/main.go @@ -1,9 +1,12 @@ // functions1 // Make me compile! -// I AM NOT DONE package main func main() { call_me() } + +func call_me() { + +} diff --git a/exercises/functions/functions2/main.go b/exercises/functions/functions2/main.go index a8ab96e..39915b5 100644 --- a/exercises/functions/functions2/main.go +++ b/exercises/functions/functions2/main.go @@ -1,7 +1,6 @@ // functions2 // Make me compile! -// I AM NOT DONE package main import "fmt" @@ -10,7 +9,7 @@ func main() { callMe(10) } -func callMe(num) { +func callMe(num int) { for n := 0; n <= num; n++ { fmt.Printf("Num is %d\n", n) } diff --git a/exercises/functions/functions3/main.go b/exercises/functions/functions3/main.go index 5559841..69301b0 100644 --- a/exercises/functions/functions3/main.go +++ b/exercises/functions/functions3/main.go @@ -1,13 +1,12 @@ // functions3 // Make me compile! -// I AM NOT DONE package main import "fmt" func main() { - call_me() + call_me(5) } func call_me(num int) { diff --git a/exercises/functions/functions4/main.go b/exercises/functions/functions4/main.go index 2931b93..87ca90a 100644 --- a/exercises/functions/functions4/main.go +++ b/exercises/functions/functions4/main.go @@ -1,7 +1,6 @@ // functions4 // Make me compile! -// I AM NOT DONE package main import "fmt" @@ -10,6 +9,6 @@ func main() { fmt.Println("1 + 2 is: ", addNumbers(1, 2)) // don't change this line } -func addNumbers(a int, b int) { +func addNumbers(a int, b int) int { return a + b } |