Imports System
Public Module Module1
Public Sub Main()
dim array() as integer={1,3,54,6,65,23,12}
console.WriteLine(average(array))
End Sub
public function average(array() as integer)
dim avrg as integer
for i = 0 to array.getupperbound(0)
avrg = avrg + array(i)
next
avrg = avrg / array.Length
return avrg
end function
End Module