• 2021-04-14
    本程序的功能为单击窗体,分别调用Swap1和Swap2子过程,使Form1的输出结果为
    A1=10 B1=20
    A2=20 B2=10
    请将程序补充完整。
    Public Sub Swap1(【1】)
    Dim t As Integer
    t = x: x = y: y = t
    End Sub
    Public Sub Swap2(【2】)
    Dim t As Integer
    t = x: x = y: y = t
    End Sub
    Private Sub Form_Click()
    Dim a As Integer, b As Integer
    a = 10: b = 20
    【3】
    Form1.Print "A1="; a, "B1="; b
    call swap2(a,b)
    Form1.Print "A2="; a, "B2="; b
    End Sub