Created a file to find the mim average of a subarray