回覆列表
  • 1 # 火奇飛

    Private Sub Form_Click()

    Dim A() As Long, N As Integer, I As Integer, J As Integer

    N = Val(InputBox("請輸入"))

    ReDim A(N, N)

    Me.Cls

    For I = 1 To N

    For J = 1 To I

    If J = 1 Or I = J Then

    A(I, J) = 1

    Else

    A(I, J) = A(I - 1, J - 1) + A(I - 1, J)

    End If

    Next J

    Next I

    For I = 1 To N

    For J = 1 To I

    Print A(I, J);

    Next J

    Print

    Next I

    End Sub

  • 中秋節和大豐收的關聯?
  • 用蛋糕油打海綿蛋糕怎麼打不發?