【简答题】写出下列程序运行时,单击窗体后,输入 n 为 3 ,窗体上的显示结果。 Private Sub Command1_Click() Dim x As Integer, n As Integer, i As Integer, j As Integer x = 0 n = Val(InputBox("")) For i = 1 To n For j = 1 To i x = x + 1 Next j N...
【单选题】运行下列程序,单击窗体后显示的结果为( )。 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 As Integer Dim i As Integer a = 2 For i = 1 To 3 Print F(a)...
【单选题】窗体上有两个水平滚动条 HV 、 HT ,还有一个文本框 Text1 和一个标题为"计算"的命令按钮 Command1 ,并编写了以下程序: PrivateSub Command1_Click() Callcalc(HV.Value , HT.Value) EndSub PublicSub calc(x As Integer , y As Integer) Text1.Text = x*y End...
A.
过程调用语句不对,应为 calc(HV , HT)
B.
过程定义语句的形式参数不对,应为 Sub calc(x As Control , y As Control)