有如下程序: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 6
B.6 6
C.8 8
D.10 12
第1题:
假定w、x、y、z、m均为int型变量,有如下程序段:
N=1;x=2;y=3;z=4;
m=(W<X)?W:K;
m=(m<y)?m:y;
m=(m<z)?m:z;
则该程序运行后,m的值是【 】
第2题:
第3题:
4、有如下程序段,运行该程序代码段后,消息对话框中显示的内容为______。 Dim i%, j%, n%, m%, k% m = 0 : k = 0 For i = 1 To 5 k = k + 1 n = 0 For j = 1 To 2 n = n + 1 m = m + 1 Next j Next i MsgBox(k & " " & n & " " & m)
A.5 10 2
B.5 10 10
C.5 2 10
D.5 2 2
第4题:
有如下程序。
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 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 6
B.6 6
C.8 8
D.10 12
第5题: