[填空题] 运行下列程序: Dim t As Integer Private Sub Form_Click() t = 2 x=Val(InputBox("输入一个整数5")) Print funl(x); t End Sub Private Function fun1(y) If y>0 Thenfun1 = 1: t=10 Else If y=0 Thenfun1 = 0: t=20 Elsefun1 = -1: t=30 End If End Function 从键盘为变量x输入数据5,输出的结果是 【8】 。
参考答案:
1 10解析:[分析]: t为模块级变量,在子函数中计算的结果10改变了主函数中的t值,fun1函数名返回的值为1。问题解析:
解析无

![[填空题] 运行下列程序: Dim t As Integer Private Sub Form_Click() t = 2 x=Val(InputBox("输入一个整数5" [填空题] 运行下列程序: Dim t As Integer Private Sub Form_Click() t = 2 x=Val(InputBox("输入一个整数5"](http://www.mshxw.com/aiimages/31/257779.png)
