Option Base 1
Dim a(4, 5) As Integer
Dim i As Integer, j As Integer, m As Integer, p As Integer, t As Integer, f As Integer, n As Integer, s As Integer
Private Sub Command1_Click()
Randomize
Picture1.Cls
For i = 1 To 4
For j = 1 To 5
a(i, j) = Int(Rnd * 100)
Picture1.Print a(i, j)
Next j
Picture1.Print
Next i
End Sub
Private Sub Command2_Click()
p = 0
For i = 1 To 4
m = a(i, 1)
For j = 1 To 5
If a(i, j) >= m Then m = a(i, j): t = j
Next j
n = a(1, t)
For f = 1 To 4
If a(f, t) <= n Then n = a(f, t)
Next f
If m = n Then
Print MsgBox(i &" " &t, 64, "行号和列号")
'Print "行号和列号分别是" &i &t
p = p + 1
End If
Next i
If p = 0 Then Print MsgBox("鞍点不存在", 64, "行号和列号")
End Sub
Private Sub Command3_Click()
Picture1.Cls
Cls
End Sub
Private Sub Command4_Click()
End
End Sub
Private Sub Form_Load()
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)