Browse Source

Update README.md

1274-oddlength
Hamza elkhatri 2 years ago committed by David Mata
parent
commit
c8f6198854
  1. 12
      subjects/arraysum/README.md

12
subjects/arraysum/README.md

@ -8,7 +8,7 @@ Write a function that takes an array of numbers and returns the sum of all the n
### Expected function ### Expected function
```go ```go
func ArraySum(numbers []int) int { func SumArray(numbers []int) int {
// your code here // your code here
} }
``` ```
@ -23,10 +23,10 @@ import (
) )
func main(){ func main(){
fmt.Println(ArraySum([]int{1,2,3,4,5})) fmt.Println(SumArray([]int{1,2,3,4,5}))
fmt.Println(ArraySum([]int{})) fmt.Println(SumArray([]int{}))
fmt.Println(ArraySum([]int{-1,-2,-3,-4,-5})) fmt.Println(SumArray([]int{-1,-2,-3,-4,-5}))
fmt.Println(ArraySum([]int{-1,2,3,4,-5})) fmt.Println(SumArray([]int{-1,2,3,4,-5}))
} }
``` ```
@ -38,4 +38,4 @@ $ go run .
0 0
-15 -15
3 3
``` ```

Loading…
Cancel
Save