【单选题】运行下列程序,单击窗体后输出的结果是( ) Function f(ByVal x As Integer) Static z z = z + 1 x = x + z f = x + z End Function Private Sub Form_Click() Dim a%, i% a = 2 For i = 1 To 3 Print f(a), Next i End Sub
【简答题】当运行下列程序,单击窗体后,分别输入72和24,信息框上显示的结果是【 】。 Private Sub Form_Click() Dim x As Integer,y As Integer x=Val(InputBox('输入整数72')) y=Val(InputBox('输入整数24')) z=fun1(x,y) MsgBox Str(Z) End Sub Private Function fun...
【单选题】设有如下的Sub过程:Sub S(x As Single, y As Single) t = x x = t / y y = t Mod yEnd Sub在窗体上画一个命令按钮Cmd1,然后编写如下事件过程:Private Sub Cmd1_Click() Dim a As Single, b As Single a = 5 : b = 4 S a, b Print a, bEnd Sub程序运行...
【单选题】在窗体上画一个命令按钮Cmd1,然后编写下列代码:Private Sub Cmd1_Click() Dim a1(10) As Integer, a2(10) As Integer n = 3 For i = 1 To 5 a1(i) = i a2(n) = 2 * n + i Next i Print a2(n); a1(n)End Sub程序运行后,单击命令按钮,输出的结果是 ...
【单选题】设在窗体上有个文本框,然后编写如下的事件过程: Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer) Const Alt=4 Const Key_F2=&H71 altdown%=(Shift And Alt)>0 f2down%=(KeyCode=Key_F2) If altdown% And f2down% Then Te...