单选题
VB
题号 #150570
在窗体上画一个名称为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.15
B.14
C.13
D.12
A.0 1 2 3
B.1 2 3 4
C.0 1 3 2
D.出错信息