Write a function that takes in a variable number of Int parameters and returns the sum of all the arguments.
func sum(nums: Int...) -> Int { var sum = 0 for num in nums { sum += num//www . j a va 2 s. c om } return sum }