英国VB公司
答案:2 悬赏:30 手机版
解决时间 2021-02-18 08:33
- 提问者网友:一抹荒凉废墟
- 2021-02-18 00:16
英国VB公司
最佳答案
- 五星知识达人网友:一袍清酒付
- 2021-02-18 00:57
Dim a()
Private Sub Form_Click()
Dim m As Integer, n As Integer
m = Val(InputBox("请输入行数"))
n = Val(InputBox("请输入列数"))
ReDim a(m, n)
Randomize
Text1.Text = ""
For i = 1 To m
For j = 1 To n
a(i, j) = Int(Rnd * 100 + 1)
Text1.Text = Text1.Text & Format(a(i, j), "!@@@@")
Next j
Text1.Text = Text1.Text & vbCrLf
Next i
find = 0
For i = 1 To m
big = a(i, 1)
col = 1
For j = 1 To n
If big < a(i, j) Then
big = a(i, j)
col = j
End If
Next j
flag = 1
For k = 1 To m
If big > a(k, col) Then
flag = 0
Exit For
End If
Next k
If flag = 1 Then
find = 1
Text2.Text = "鞍点在" & i & "行" & col & "列"
End If
Next i
If find = 0 Then MsgBox "无鞍点"
End Sub
Private Sub Form_Click()
Dim m As Integer, n As Integer
m = Val(InputBox("请输入行数"))
n = Val(InputBox("请输入列数"))
ReDim a(m, n)
Randomize
Text1.Text = ""
For i = 1 To m
For j = 1 To n
a(i, j) = Int(Rnd * 100 + 1)
Text1.Text = Text1.Text & Format(a(i, j), "!@@@@")
Next j
Text1.Text = Text1.Text & vbCrLf
Next i
find = 0
For i = 1 To m
big = a(i, 1)
col = 1
For j = 1 To n
If big < a(i, j) Then
big = a(i, j)
col = j
End If
Next j
flag = 1
For k = 1 To m
If big > a(k, col) Then
flag = 0
Exit For
End If
Next k
If flag = 1 Then
find = 1
Text2.Text = "鞍点在" & i & "行" & col & "列"
End If
Next i
If find = 0 Then MsgBox "无鞍点"
End Sub
全部回答
- 1楼网友:西岸风
- 2021-02-18 02:17
搜一下:英国VB公司
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯