单击一次窗体之后,下列程序代码的执行结果为______。 Private Sub Command1_ Click() Dim a As Integer, b As Integer, c As Integer a = 1: b = 2: c = 4 Print Value(a, b,C)End Sub Function Num(x As Integer, y As Integer, z As Integer) Num = x * x + y * y + z * z End Function Function Value(x As Integer, y As Integer, z As Integer) Value = Num(x, y, z) + 2 * x End Function
A.21
B.23
C.19
D.35
第1题:
单击一次命令按钮之后,下列程序代码的执行结果为 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
第2题:
单击窗体时,下列程序代码的执行结果为______ 。 Private Sub Test (x As Integer) x=x*2+1 If x < 6 Then Call Test(x) End If x-x*2+1 Print x; End Sub Private Sub Command1_ Click () Test 2 End Sub
A.23 47
B.5 11
C.10 22
D.23 29
第3题:
单击窗体时,下列程序代码的运行结果为()。 Private Sub Test(x As Integer) x = x * 2 + 1 If x < 6 Then Call Test(x) End If x = x * 2 + 1 Print x; End Sub Private Sub Form_Click() Test 2 End Sub
A.5 11
B.23 47
C.10 22
D.23 23
第4题:
单击一次命令按钮,下列程序代码的执行结果为( )。 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
第5题:
单击一次命令按钮之后,窗体中的输出结果为______。 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