俺是个VB白痴,求助一个题目:
编制通用的Sub过程
急用!!在线等!谢谢!
Option Explicit
Option Base 1
Private Sub Command1_Click()
Dim a(5, 5) As Integer
Dim i As Integer, j As Integer
Dim Row As Integer, Col As Integer
Dim Max As Integer
For i = 1 To 5
For j = 1 To 5
a(i, j) = Rnd * 90 + 10
Print a(i, j);
Next
Print
Next
Max = a(1, 1)
For i = 1 To 5
For j = 1 To 5
If a(i, j) > Max Then
Max = a(i, j)
Row = i
Col = j
End If
Next
Next
Print "最大值是"; Max
Print "行号"; Row
Print "列号"; Col
End Sub