单击一次命令按钮之后,下列程序代码的执行结果为______。 Private Sub Command1_ Click() a = fun(4) + fun(5) Print a; End Sub Public Function fun (n As Integer) Static Num For i = 1 To n Num = Num + i Next i fun = Num End Function
A.15
B.20
C.35
D.40
第1题:
单击一次命令按钮之后,窗体中的输出结果为______。 Private Sub Command1_ Click() For i = 1 To 4 x = fun(i) Print x; Next i End Sub Function (n) x = n * n FF = x End Sub
A.1 4 9 16
B.1 3 5 7
C.3 6 9 12
D.2 4 6 8
第2题:
单击命令按钮时,下列程序代码的执行结果为______ 。Public Function MyFune(m As Integer,n As Integer) As Integer Do While m<>n Do While m>n m=m-n Loop Do While m<n n=n -m Loop Loop MyFunc=mEnd FunctionPrivate Sub Command1_Click() Print MyFunc(24, 18)End Sub
A. 2
B.4
C.6
D.8
第3题:
单击命令按钮时,下列程序代码的执行结果为 Public Sub Procl(n As Integer,ByVal m As integer) n=n Mod 10 m=m\10 End sub Private Sub Commandl_Click() Dim x AS Integer,y AS Integer x=12:y=24 Call Procl(x,y) Print x;y End sub
A.12 24
B.2 24
C.2 3
D.12 2
第4题:
单击命令按钮时,下列程序代码的执行结果为______。Public Sub Procl (n As Integer,ByVal m As Integer) n= n Mod 10 m=m/10End SubPrivate Sub Conunand1_Click() Dim x As Integer,y As Integer x=12:y=34 Call Procl(x,y) Print x;yEnd Sub
A.12 34
B.2 34
C.2 3
D.12 3
第5题:
单击一次命令按钮,下列程序代码的执行结果为( )。 Private Sub Commandl_Click() Dima As Integer,b As Integer,CASInteger a=2:b=3:c=4 PrintP2(c,b,A) End Sub PrivateFunctionPl(X As Integer,y As Intege;z As Integer) P1=2*x+y+3*Z End Function Priva
A.21
B.19
C.17
D.34
第6题:
单击一次命令按钮之后,下列程序代码的执行结果为 private Sub Command1_Click() S=P(1) +P(1)+P(2)+P(3)+P(4) Print S: End Sub Public Function P(N As Integer) Static Sum For I=1 To n Sum=Sum+I Next 1 P=Sum End Function
A.20
B.35
C.115
D.135
第7题:
单击命令按钮时,下列程序代码的执行结果为_________。 Public Sub Procl(n As Integer,By Val m As Integer) n=n Mod i() m=m/10 End Sub Private Sub Command1 CliCk() Dim x As Integer,y As Integer x=12:y=34 Call Procl(x,y) Print x;y End Sub
A.12 34
B.2 34
C.2 3
D.12 3
第8题:
单击命令按钮之后,下列程序代码的执行结果为______。 Private Function P(N As Integer) Static sum For I=I To N Sum = sum +1 Next I P =sum End Function Private Sub Command1_Click() S=P(1)+P(2)+P(3)+P(4) Print S: End Sub
A.20
B.30
C.115
D.135
第9题:
单击命令按钮时,下列程序代码的执行结果为 ______。 Public Sub Procl(n As Integer,ByVal m As Integer) n=n Mod 10 m=m/10 End Sub Private Sub Command1_Click() Dim x As Integer,y As Integer x=12: y=34 Call Procl(x,y) Print x;y End Sub
A.12 34
B.2 34
C.2 3
D.12 3