在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为( )。 Private Sub fun() Static a As Integer a=a+2 Print a; End Sub Private Sub Command1_Click() Dim m As Integer For m=1 To 3 Call fun Next m End SubA.2 2 2B.0 0 0C.2 4 8D.2 4 6
在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为( )。 Private Sub fun() Static a As Integer a=a+2 Print a; End Sub Private Sub Command1_Click() Dim m As Integer For m=1 To 3 Call fun Next m End Sub
A.2 2 2
B.0 0 0
C.2 4 8
D.2 4 6
相关考题:
在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Commandl—Click() x=InputBox(“请输入一个整数”) Print x+345 End Sub 程序运行后,单击命令按钮,在输入对话框中输入123,则在窗体上输出的内容为( )A.123345B.468C.123D.345
在窗体上画一个按钮,然后编写如下事件代码。单击按钮,输出为 ______。 Private Function fun3(x As Integer) Static t As Integer t = t + 3 t = t + x fun3 = t End Function Private Sub Commandl Click() Dim a As Integer, b As Integer, c As Integer a = 2 : b = 1 c = fun3 (A)c = fun3 (B)Print c End SubA.6B.8C.9D.12
在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为( )。 Private Function fun(x As Integer,y As Integer) Static m As Integer Static i As Integer i=i+2 i=i+m+1 m=i+x+y fun=m End Function Private Sub Command1_Click() Dim j As Integer,m As Integer,k As Integer j=4:m=1 k=fun(j,m) Print k; k=fun (j,m) Print k End SubA.8 18B.7 17C.7 19D.8 19
在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为,( )。 Private Sub fun(ByVal x As Integer,ByVal y As Integer,Byval z As Integer) z=x^3*y^3 End Sub Private Sub Command1_Click() Dim m As Integer Call fun(2,3,m) Print m End SubA.216B.0C.35D.程序不能运行