以下程序运行后,单击命令按钮,窗体显示的结果是 ______。 Private Function p1(x As Integer,y As Integel,z As Integer) p1=2*x+y+3*z End Function Private Function p2(x As Integer,y As Integer,z As Integer) p2=p1(2,y,x)+x End Function Private SubCommandl_Click() Dim a As Integer Dim b As Integer Dim c As Integer a=2:b=3:c=4 Print p2(c,b,A)End SubA.19B.21C.22D.23

以下程序运行后,单击命令按钮,窗体显示的结果是 ______。 Private Function p1(x As Integer,y As Integel,z As Integer) p1=2*x+y+3*z End Function Private Function p2(x As Integer,y As Integer,z As Integer) p2=p1(2,y,x)+x End Function Private SubCommandl_Click() Dim a As Integer Dim b As Integer Dim c As Integer a=2:b=3:c=4 Print p2(c,b,A)

End Sub

A.19

B.21

C.22

D.23


相关考题:

下列程序运行后,单击命令按钮,窗体显示的结果为( )。 Private Function pl(x As Integer,y As Integer,z As Integer) pl=2*x+y+3*z End Function Private Function p2(X As Integer,y As Integer,z As Integer) p2=p1(z,y,x)+x End Function Private Sub Commandl_Click()A.23B.19C.21D.22

在窗体上画一个名称为Command1的命令按钮,然后编写如下程序: Private Sub Command1_Click() Dim x As Integer Static y As Integer Cls x=x+5 y=y+3 Print x,y End Sub 程序运行时,两次单击命令按钮Command1后,窗体显示的结果是( )。A.10 6B.5 6C.5 3D.10 3

(16)在窗体上画一个命令按钮,其名称为Commandl.程序运行后,单击命令按钮,输出结果是 Private Sub p1(n As Integer) For i=n To 1 Step -1 x=String(i,"*") Print x Next i End Sub Private Sub Commandl_Click() P1(3) End SubA.*** ** *B.* ** ***C.* * *D.******

在窗体上画一个名称为Command1的命令按钮,然后编写如下程序:Private Sub Commandl_Click( )Static X As IntegerStatic Y As IntegerClsY=1Y=Y+5X=5+XPrint X, YEnd Sub程序运行时,3次单击命令按钮Command1后,窗体上显示的结果为【 】。

在窗体上画一个命令按钮,其名称为Commandl,然后编写如下程序:Function a(x As Integer, y As Integer) As Integera = IIf(x > y, x, y)End FunctionPrivate Sub Command1_Click()Dim n As Integer, m As Integern = 10m = 20Print a(n, m)End Sub程序运行后,单击命令按钮,输出结果是______。

在窗体上画一个名称为Commandl的命令按钮,然后编写如下程序: Private Sub Command1_Click() Static X As Integer Static Y As Integer Cls Y = 1 Y = Y + 5 X = 5 + X Print X, Y End Sub 程序运行时,三次单击命令按钮Commandl后,窗体上显示的结果为A.15 16B.15 6C.15 15D.5 6

在窗体上画一个命令按钮,名称为Command1。然后编写如下程序: Pnvate Sub Command1_Click() Dim x As Integer,y As Integer,t As Integer x=10:y=20:t=0 If x=y Then t=x:x=y:y=t Print x;y End Sub程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。A.10 20B.20 0C.20 10D.20 20

标准模块中有如下程序代码: Public x As Integer,y As Integer Sub var pub( ) x=10:y=20 End Sub 在窗体上有1个命令按钮,并有如事件过程: Private Sub Command1 Click( ) Dim x As Integer Call var pub x=x+100 y=y+100 Print x;y End Sub 运行程序后单击命令按钮,窗体上显示的是( )。A.100 100B.100 120C.110 100D.110 120

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:Private Sub Command1_Click()x = -5If Sgn(x) Then y = Sgn(x ^ 2)Else y = Sgn(x)End IfPrint yEnd Sub程序运行后,单击命令按钮,窗体上显示的是( )。A.-5B.25C.1D.-1