回覆列表
  • 1 # YAO大神

    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

  • 中秋節和大豐收的關聯?
  • 商業的誕生,發展,進化和終結是一個過程還是一個現象?