Exercise: Report statistics
Given some numbers in an array, print out the total, the average, the minimum and the maximum values.
package main
import "fmt"
func main() {
numbers := [...]int{2, 3, 5, -1, 1, 8}
fmt.Println(numbers)
}
Expected output:
[2 3 5 -1 1 8]
Total: 18
Average: 3
Min: -1
Max: 8