Private Sub Command1_Click()
Dim a(20, 20) As Integer
n = CInt(InputBox("N="))
Print "N="; n
Print
Randomize
i1 = 1: j1 = 1
For i = 1 To n
For j = 1 To n
a(i, j) = Int(Rnd * 100)
Print Tab(5 * j); a(i, j);
If a(i, j) > a(i1, j1) Then
i1 = i
j1 = j
End If
Next j
Next i
Print "最大值=a(" & i1 & "," & j1 & ")="; a(i1, j1)
End Sub
Private Sub Command1_Click()
Dim a(20, 20) As Integer
n = CInt(InputBox("N="))
Print "N="; n
Print
Randomize
i1 = 1: j1 = 1
For i = 1 To n
For j = 1 To n
a(i, j) = Int(Rnd * 100)
Print Tab(5 * j); a(i, j);
If a(i, j) > a(i1, j1) Then
i1 = i
j1 = j
End If
Next j
Print
Next i
Print
Print "最大值=a(" & i1 & "," & j1 & ")="; a(i1, j1)
End Sub
Private Sub Command1_Click()
Dim a(20, 20) As Integer
n = CInt(InputBox("N="))
Print "N="; n
Print
Randomize
i1 = 1: j1 = 1
For i = 1 To n
For j = 1 To n
a(i, j) = Int(Rnd * 100)
Print Tab(5 * j); a(i, j);
If a(i, j) > a(i1, j1) Then
i1 = i
j1 = j
End If
Next j
Print
Next i
Print
Print "最大值=a(" & i1 & "," & j1 & ")="; a(i1, j1)
End Sub