initial commit

This commit is contained in:
specCon18 2023-12-18 03:40:05 -05:00
commit 493ce92e02
62 changed files with 1213 additions and 0 deletions

View file

@ -0,0 +1,20 @@
package main
import "fmt"
// below is a func that takes in an arbitrary number of ints as args
func sum(nums ...int) {
fmt.Print(nums, " ")
total := 0
for _, num := range nums {
total += num
}
fmt.Println(total)
}
func main(){
sum(1,2)
sum(1,2,3)
nums := []int{1,2,3,4}
sum(nums...)
}