vb程序设计中,数组的教学 求数组中最大元素及所在下标 Dim a(1 To 10) As Integer Dim max As Integer, m As Integer max = a(1): m = 1For i = 2 To 10If a(i) > max Then max = a(i) m = iEnd If Next iPrint "最大值为:"; max, "最大值的下标为:"; m