Topics
Introduction
I have used Swift for windows 1.9 for debugging purpose. But you can use any Swift programming language compiler as per your availability.
func sumofnumbers(_ arra: [Int]) -> Int { return arra.reduce(0, +) } print(sumofnumbers([-7, 5, 2, 0])) print(sumofnumbers([3, 4, 5, 8])) print(sumofnumbers([2, 6, 2, 1]))