有如下程序:Private Sub Command1_Click()Dim k As Integer, m As IntegerDim p As Integerk=4: m=1p=PC(k, m) : Print p;p=PC(k, m) : Print pEnd SubPrivate Function PC(a As Integer, b As Integer)Static m As Integer, i As Integerm=0: i=2i=i + m + 1m=i + a + bPC=mEnd Function程序运行后,输出的结果为( )。A.4 6B.6 6C.8 8D.10 12
有如下程序:
Private Sub Command1_Click()
Dim k As Integer, m As Integer
Dim p As Integer
k=4: m=1
p=PC(k, m) : Print p;
p=PC(k, m) : Print p
End Sub
Private Function PC(a As Integer, b As Integer)
Static m As Integer, i As Integer
m=0: i=2
i=i + m + 1
m=i + a + b
PC=m
End Function
程序运行后,输出的结果为( )。
A.4 6
B.6 6
C.8 8
D.10 12
相关考题:
以下用户自定义函数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
以下用户自定义函数 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-i-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
有如下程序: Private Sub Command1_Click() Dim k As Integer,m As Integer Dim p As Integer k=4:m=1 p=PC(k,m):Print p; p=PC(k,m):Print p End Sub Private Function PC(a As Integer,b As Integer) Static m As Integer,i As Integer m=0:i=2 i=i + m + 1 m=i + a + b PC=m End Function 程序运行后,输出的结果为A.4 6B.6 6C.8 8D.10 12
有如下程序: Private Sub Command1_Click() Dim k As Integer,m As Integer Dim op As Integer k=4:m=1 p=PPC(k,m):Print op; p=PPC(k.m):Print op End Sub Private Function PPC(a As Integer,b As Integer) Static m As Integer,i As Integer m=0:i=2 i=i+m+1 m=i+a+b PPC=m End Function 程序运行后,输出的结果为A.4 6B.6 6C.8 8D.10 12
有如下的程序: Private Sub Command1_Click() Dim k As Integer,m As Integer Dim P As Integer k=4:m=1 P=Fun(k,m):Print P; P=Fun(k,m):Print P End Sub Private Function Fun(a As Integer,b As Integer) Static m As Integer,i As Integer in=5:i=2 i=i+m+1 m=i+a+b Fun=m\2 End Function 单击命令按钮后,输出结果为A.2 2B.4 4C.5 5D.6 6
以下用户自定义函数 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
有如下的程序。Private Sub Command1_Click()Dim k As Integer, m As IntegerDim P As Integerk=4: m=1P=Fun(k, m) : Print P;P=Fun(k, m) : Print PEnd SubPrivate Function Fun(a As Integer, b As Integer)Static m As Integer, i As Integerm=5: i=2i=i + m + 1m=i + a + bFun=m \ 2End Function单击命令按钮后,输出结果为A.2 2B.4 4C.5 5D.6 6
有如下程序。Private Sub Command1_Click()Dim k As Integer, m As IntegerDim op As Integerk=4: m=1op=PPC(k, m) : Print op;op=PPC(k, m) : Print opEnd SubPrivate Function PPC(a As Integer, b As Integer)Static m As Integer, i As Integerm=0: i=2i=i + m + 1m=i + a + bPPC=mEnd Function程序运行后,输出的结果为A.4 6B.6 6C.8 8D.10 12
有如下程序:Private Sub Command1_Click() Dim k As Integer,m As Integer Dim op As Integer k=4:m=1 op:PPC(k,m):Print op; op:PPC(k,m):Print opEnd SubPrivate Function,PPC(a As Integer,b As Integer) Static m As Integer,i As Integer m=0:i=2 i=i+m+1 m=i+a+b PPC=mEnd Function程序运行后,输出的结果为A.4 6B.6 6C.8 8D.10 12