回覆列表
  • 1 # 變餅檔

    Dim n As Integer

    Dim a() As Integer

    Dim i As Integer

    Private Sub Command1_Click()

    n = Val(Text1.Text)

    Dim str As String

    str = ""

    ReDim a(n)

    For i = 1 To n

    a(i) = InputBox("ÇëÊäÈëµÚ" & i & "¸öÊý×éÔªËصÄÖµ")

    str = str & a(i) & " "

    Next i

    Label4.Caption = str

    End Sub

    Private Sub Command2_Click()

    Dim sum As Integer

    sum = 0

    For i = 1 To n

    If i Mod 2 <> 0 Then

    sum = sum + a(i)

    End If

    Next i

    Text2.Text = sum

    End Sub

  • 中秋節和大豐收的關聯?
  • 魯濱遜漂流記,裡面的魯濱遜真的存在嗎?