Sub main()Dim a(10)Dim i, max, minmax = -32766min = 32766For i = 0 To 9 a(i) = CInt(InputBox("输入一个数:", "例子", i)) If a(i) > max Then max = a(i) If a(i) < min Then min = a(i)Next iMsgBox "最大数是:" & max & ", 最小数:" & min End Sub