回覆列表
  • 1 # 木子李ovo

    Private Sub Command1_Click()

    Dim a() As Integer

    m = InputBox("請輸入行數m:")

    n = InputBox("請輸入列數n:")

    ReDim a(m, n)

    For i = 1 To m

    For j = 1 To n

    a(i, j) = InputBox("請輸入a(" & i & "," & j & ")")

    Print a(i, j);

    Next j

    Print

    Next i

    Max = a(1, 1)

    For i = 1 To m

    For j = 1 To n

    If Max < a(i, j) Then

    Max = a(i, j)

    x = i

    y = j

    End If

    Next j

    Next i

    Print

    Print "最大值為" & Max & "在第" & x & "行" & y & "列"

    End Sub

  • 中秋節和大豐收的關聯?
  • Z3735F與mtk8392哪個好?