单选题
VB
题号 #145203
在窗体上画一个名称为Command1的命令按钮,然后编写如下通用过程和命令按钮的事件过程:
Private Function f(m As Integer)
If m Mod 2 = 0 Then
f = m
Else
f = 1
End If
End Function
Private Sub Command1_Click()
Dim i As Integer
s = 0
For i = 1 To 5
s = s + f(i)
Next
Print s
End Sub
程序运行后,单击命令按钮,在窗体上显示的是( )。
参考答案
C
答案解析
暂无解析
你可能感兴趣的试题
A.11
B.10
C.9
D.8
A.15
B.14
C.13
D.12