更多"阅读下列程序: PrivateSubCommand1_Click( "的相关试题:
[单项选择]阅读下列程序。
Private Sub Command1_Click( )
Dim i As Integer,k As Integer
k=2
For i=1 To 3
Print Fun(k);
Next
End Sub
Function Fun(j As Integer)
Static b
a=0
a=a + 1
b=b + 1
Fun=a*b+j
End Function
程序运行后,单击命令按钮输出结果是
A. 234
B. 345
C. 567
D. 356
[单项选择]阅读程序:
Private Sub Form_Click( )
Dim i As Integer, sum As Integer
For i=2 To 10
If i Mod 2<>0 Then
Print i;
Else
sum=sum+i
End If
Next i
Print sum
End Sub
程序运行后,单击窗体,在窗体上的输出结果是______。
A. 3 5 7 9 30
B. 1 3 5 7 9
C. 2 4 6 8 20
D. 11 15 17 19 20
[单项选择]阅读下列程序:
PrivateSubCommand1_Click( )
Dim i As Integer,k As Integer
k=2
For i=1 To 3
Print Fun(k);
Next
End Sub
Function Fun(j As Integer)
Static b
a=0
a=a+1
b=b+1
Fun=a*b+j
End Function 程序运行后,单击命令按钮输出结果是
A. 234
B. 345
C. 567
D. 356
[单项选择]有如下程序:: Private Sub Form Click( ) Dim i As Integer,sum As Integer sum=0 For i=2 To 10 If i Mod 2 <>0 And i Mod 3=0 Then sum=sum+i End If Next i Print sum End Sub 程序运行后,单击窗体,输出结果为______。
A. 12
B. 30
C. 24
D. 18
[单项选择]阅读下列程序:
Private Sub Form Click( )
Dim i As Integer, sum As Integer
For i = 2 To 10
If i Mod 2 <> 0 Then
Print i;
Else
sum = sum + i
End If
Next i
Print sum
End Sub
程序运行后,单击窗体,在窗体上的输出结果是
A. 3 5 7 9 30
B. 1 3 5 7 9
C. 2 4 6 8 20
D. 11 15 17 19 20
[单项选择]阅读下列程序:
PrivateSubCommand1_Click( )
Dim i As Integer,k As Integer
k=2
For i=1 To 3
Print Fun(k);
Next
End Sub
Function Fun(j As Integer)
Static b
a=0
a=a+1
b=b+1
Fun=a*b+j
End Function
程序运行后,单击命令按钮输出结果是
A. 234
B. 345
C. 567
D. 356
[单项选择]阅读下列程序:
Private Sub Command1_Click( )
Dim i As Integer,k As Integer
k=2
For i=1 To 3
Print H(k);
Next i
End Sub
Function H(j As Integer)
a=0
Static b
a=a+1
b=b+1
H=a*b+j
End Function
程序运行后,单击命令按钮输出结果是( )。
A. 234
B. 345
C. 567
D. 356
[单项选择]阅读下列程序: Private Sub Commad1_Click( ) Dim i As Integer,k As Integer k=2 For i=1 To 3 Print H(k) Next i End Sub Function H(j As Integer) a=0 Static b a=a+1 b=b+1 H=a*b+j End Function 程序运行后,单击命令按钮输出结果是
A. 234
B. 345
C. 567
D. 356