Go
Example of creating an array and then calculating the average of all the values.
package main
import "fmt"
func main() {
x := [6]float64{
83,
97,
65,
56,
90,
22,
}
var total float64
for _, value := range x {
total += value
}
fmt.Println(total / float64(len(x)))
}