求大佬解决一个VB问题
Private Sub Command1_Click()
Dim m As Integer, n As Integer
m = InputBox("请输入矩阵的行数:")
n = InputBox("请输入矩阵的列数:")
Dim a(20, 20) As Integer
m1 = 1: n1 = 1: m2 = 1: n2 = 1
Randomize
For i = 1 To m
For j = 1 To n
a(i, j) = Rnd * 90 + 10
Print a(i, j);
If a(i, j) > a(m1, n1) Then m1 = i: n1 = j
If a(i, j) < a(m2, n2) Then m2 = i: n2 = j
Next j
Next i
Print "最大值: A(" & m1 & "," & n1 & ")=" & a(m1, n1)
Print "最小值: A(" & m2 & "," & n2 & ")=" & a(m2, n2)
End Sub