运行下列程序:Private Sub Form_Click( )For i = 1 To 20If fun1(i) Thens = s + 1End IfNext

22 查阅

运行下列程序:

Private Sub Form_Click( )

For i = 1 To 20

If fun1(i) Then

s = s + 1

End If

Next i

Print s

End Sub

Private Function fun1(y) As Boolean

If y Mod 2 <> 0 Then

fun1 = False

Else

fun1 = True

End If

End Function

单击窗体后,则在窗体上显示的结果是( )。

A.110

B.10

C.0

D.20

参考答案:

B

计算机二级