编写如下事件过程: Private Sub Form_Click() k=2 Ifk>=1 Then A=3 Ifk>=2 Then A=2 Ifk>=3 Then A=1 Print A End Sub 程序运行后,单击窗体,输出的结果为 ______。A.1B.2C.3D.出错
编写如下事件过程: Private Sub Form_Click() k=2 Ifk>=1 Then A=3 Ifk>=2 Then A=2 Ifk>=3 Then A=1 Print A End Sub 程序运行后,单击窗体,输出的结果为 ______。
A.1
B.2
C.3
D.出错
相关考题:
以下用户自定义函数Function Func(a As Integer,b As Integer) As IntegerStatic m As Integer,i As Integerm=0:i=2i=i+m+im=i+a+bFunc=mEnd Function在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim k As Integer,m As Integer,p As Integerk=4:m=1P=Func(k,m)Print pEnd Sub程序运行后,单击命令按钮,输出结果为A.8B.9C.10D.11
在窗体画一个命令按钮,然后编写如下事件过程:Private Sub Command1_CIick()Dim a(1 To 10)Dim p(1 To 3)k=5For i =1 To 10a(i)=iNext iFor i=1 To 3p(i)=a(i*i)Next iFor i=1 To 3k=k+p(i)*2Next iPrint kEnd Sub程序运行后,单击命令按钮,输出结果是【 】。
以下用户自定义函数 Function Func(a As Integer, b As Integer) As Integer Static m As Integer, i As Integer m=0:i=2 i=i+m+i m=i+a+b Func=m End Function 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim k As Integer,m As Integer,p As Integer k=4:m=1 P=Func(k,m) Print p End Sub 程序运行后,单击命令按钮,输出结果为A.8B.9C.10D.11
有如下的函数过程: Function Func2(a As Integer, b As Integer)'As Integer Static m As Integer, i As Integer m=0 i=2 a=i+m+1 b=i+a+b Func2=m End Function 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim p As Integer, k As Integer, m As Integer k=4 m=1 p=Fune2(k, m) Print k; m p = Func2(k, m) Print k; m End Sub 程序运行后,单击命令按钮,输出结果为( )。A.3 6<CR>3 6B.3 6<CR>3 11C.3 11<CR>3 6D.3 11<CR>3 11
若有如下的函数过程: Function Func2(a As Integer, b As Integer)As Integer Static m As Integer, i As Integer m=0 i=2 a=i+m+1 b=i+a+b Func2 = m End Function 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim p As Integer, k As Integer, m As Integer k=4 m=1 p = Func2(k, m) Print k; m p = Func2(k, m) Print k; m End Sub 程序运行后,单击命令按钮,输出结果为( )。A.3 6<CR>3 6B.3 6<CR>3 11C.3 11<CR>3 6D.3 11<CR>3 11
以下用户自定义函数Function Func(a As Integer, b As Integer) As IntegerStatic m As Integer, i As Integerm=0:i=2i=i+m+im=i+a+bFunc=mEnd Function在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1Dim k As Integer, m As Integer,p As Integerk=4:m=1P=Func(k,m)Print pEnd Sub程序运行后,单击命令按钮,输出结果为A.8B.9C.10D.11
在窗体上添加如下命令按纽,然后编写如下事件过程: Private Sub Command1_Click() Dim a(10)As Integer Dim p(3)As Integer k= 5 For i = 1 To 10 a(i) = i Next i For i = 1 To 3 p(i) = a(i * i) Next i For i = 1 To 3 k = k + p(i) * 2 Next i Print k End Sub该过程的运行结果为______。A.35B.33C.31D.29
有如下的函数过程: Function Func2(a As Integer,b As Integer) 'As Integer Static m As Integer,i As Integer m=0 i=2 a=i+m+1 b=i+a+b Func2=m End Function 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim p AS Integer,k As Integer,m As Integer k=4 m=1 p=Func2(k,m) Print k; m p=Func2(k,m) Print k; m End Sub 程序运行后,单击命令按钮,输出结果为( )。A.3 6<CR>3 6B.3 6<CR>3 11C.3 11<CR>3 6D.3 11<CR>3 11
在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Commandl_Click()Dim a (1 To 10)Dim p(1 To 3)k=5For i=1 To 10a(i)=iNextiFori=1 To 3p(i)=a(i*i)Next iFor i=1 To 3k=k+p(i)*2Next iPrint kEnd Sub程序运行后,单击命令按钮,输出结果是【 】。