题目内容:
在窗体上画 1 个命令按钮,名称为 Command1,然后编写如下程序:Dim Flag As Boolean Private Sub Command1_Click() Dim intNum As Integer intNum=InputBox("请输入:")If Flag ThenPrint f(intNum) End IfEnd SubFunction f(X as Integer)As IntegerIf X<10 ThenY=X ElseY=X+10End If f=YEnd FunctionPrivate Sub Form_MouseUp(Button As Integer,Shift As Integer,X as Single,Y As Single) Flag=TrueEnd Sub 运行程序,首先单击窗体,然后单击命令按钮,在输入对话框中输入5,则程序的输 出结果为______。
A.0
B.5
C.15
D.无任何输出
参考答案:
答案解析: