回覆列表
  • 1 # 東東打打

    Function x(ByVal a As Integer, ByVal b As Integer, ByVal c As Integer) suma =

    1 sumb = 1 sumc = 1 For i = 1 To a suma = suma * i Next For j = 1 To b sumb = sumb * j Next For k = 1 To c sumc = sumc * k Next x = (suma + sumb) / sumc Print "呼叫Function過程時的輸出結果:" End Function Private Sub Command1_Click() Dim a(2) As Integer For i = 0 To

    2 a(i) = InputBox("輸入第" & i + 1 & "個數") Next Print x(a(0), a(1), a(2)) End Sub Sub y(ByVal a As Integer, ByVal b As Integer, ByVal c As Integer) suma = 1 sumb = 1 sumc = 1 For i = 1 To a suma = suma * i Next For j = 1 To b sumb = sumb * j Next For k = 1 To c sumc = sumc * k Next Sum = (suma + sumb )/sumc Print "呼叫Sub過程時的輸出結果:" Print Sum End Sub Private Sub Command2_Click() Dim a(2) As Integer For i = 0 To 2 a(i) = InputBox("輸入第" & i + 1 & "個數") Next y a(0), a(1), a(2) End Sub

  • 中秋節和大豐收的關聯?
  • 弦心距和絃長的區別?