Posts by Wiliam Souza • 36 points
1 post
-
2
votes1
answer173
viewsA: How to pass parameters to a function all rows of an array
Using variadic functions: package main import "fmt" // Here's a function that will take an arbitrary number // of `int`s as arguments. func sum(nums ...int) { fmt.Print(nums, " ") total := 0 for _,…
golanganswered Wiliam Souza 36