How to Calculate the Average using Arrays in Golang?
Given an array of n elements, your task is to find out the average of the array.Approach:Â Accept the size of the array.Accept the elements of the array.Store the sum of the elements using for loop.Calculate Average = (sum/size of array)Print the average. Example:Â Input: n = 4 array = 1, 2, 3, 4 Ou