题目内容:
在窗体上画一个名称为Co mmand1的命令按钮,然后编写如下程序:Di mSW As BooleanFunction func(X As Integer)As Integer If X<20Then Y =XElse Y =20+X End Iffunc =YEnd FunctionPrivate Sub Form_MouseDown(Button As Integer ,_ Shift As Integer ,X As Si ngle ,Y As Si ngle) SW=FalseEnd SubPrivate Sub Form_Mouse Up(Button As Integer ,_ Shift As Integer ,X As Si ngle ,Y As Si ngle) SW=TrueEnd SubPrivate Sub Co mmand1_Click() Di mi nt Num As Integeri nt Num=InputBox("") If SW Then Print func(i nt Num) End IfEnd Sub程序运行后,单击命令按钮,将显示一个输入对话框,如果在对话框中输入25,则程序的执行结果为( )。A.输出0
B.输出25
C.输出45
D.无任何输出
参考答案:
答案解析: