2015-day24 code pulled into algos and mathy packages

This commit is contained in:
alexchao26
2020-12-28 00:42:17 -05:00
parent c2451d4268
commit 5c933fecb6
3 changed files with 57 additions and 31 deletions
+8
View File
@@ -33,3 +33,11 @@ func SumIntSlice(nums []int) int {
}
return sum
}
func MultiplyIntSlice(nums []int) int {
product := 1
for _, n := range nums {
product *= n
}
return product
}