设有如下两个过程:
Private Sub Form_Click()
Dim x!,y!
x = 18: y = 10
Call PPP((x), y)
Print x,y
End Sub
Private Sub PPP(a As Single, b As Single)
a = a + b
Print a,b
b = a + b
Print a,b
End Sub
运行程序后, 则输出结果是________
Private Sub Form_Click()
Dim x!,y!
x = 18: y = 10
Call PPP((x), y)
Print x,y
End Sub
Private Sub PPP(a As Single, b As Single)
a = a + b
Print a,b
b = a + b
Print a,b
End Sub
运行程序后, 则输出结果是________
举一反三
- 执行下列程序后,鼠标单击窗体,输出结果为( )。 Private Sub Form_Click() Print "Click"; End Sub Private Sub Form_MouseDown(Button As Integer, Shift A: As Integer,X As Single,Y As Single) B: Print "Down" C: End Sub D: Private Sub Form_MouseUp(Button As Integer, Shift_As Integer,X As Single,Y As Single) E: Print "Up" F: End SubA) DownUpClick G: B) ClickDownUp H: C) DownClickUp I: D) UpDownClick
- 下面程序运行后,点击窗体,变量 x和y的值分别为( )、( ) Private Sub Form_Click() Dim x, y As Integer x = 5: y = 10 nc x, y Print "x="; x; "y="; y End Sub Private Sub nc(ByVal a%, b%) a = a + b b = a a = a * b End Sub
- 在窗体上添加一个命令按钮,程序运行时单击Commandl后,窗体上的输出结果为。 Private Sub fun(a%, ByVal b%) a=a*2:b=b*2 End Sub Private Sub Command1_Click() Dim x%,y% x=10:y=20 Call fun(x, y) Print x; y End Sub
- 编写如下程序: Private Sub Command1_Click() Dim x As Integer, y As Integer x = 1: y = 1 Do y = x * y If y > 10 Then Print x, y Exit Do Else x = x + 3 End If Loop While x <= 10 End Sub 运行程序,输出结果为______
- 写出下列程序的运行结果。 Private Sub Form_Click() Dim x%, y% x = InputBox("请输入一个整数") If x <= 30 And x > 10 Then If x > 20 Then If x < 25 Then y = 10 Else y = 20 End If Else If x > 15 Then y = 30 Else y = 50 End If End If End If Print y End Sub 假设输入18,则运行结果为