对窗体编写如下代码: Option Base1 Private Sub Form_Key Press(Key Ascii AsInteger) a=Array(237,126,87,48,498) m1=a(1) m2=1 IfKey Ascii=13Then ForI=2To5 Ifa(I)>mlThen m1=a(j) m2=I EndIf NextI EndIf Printm1 Printm2 EndSub 程序运行后,按回车键,输出结果为()
设有如下程序: Option Base 0 Private Sub Form_Click() Dim a Dim i As Integer a = Array(1,2,3,4,5,6,7,8,9) For i = 0 To 3 Print a(5 – i); Next End Sub 程序运行后,单击窗体,则在窗体上显示的是()
下列程序的执行结果为________Option Base 0Private Sub Command1_Click()Dim aa = Array(a, b, c, d, e, f, g)Print a(1); a(3); a(5)End sub
设窗体上有一个名称为 Option1 的单选按钮数组(其下标从 0 开始),共有 4 个单选按钮,并有下面事件过程: Private Sub Option1_Click(Index As Integer) n = Index If Index < 3 Then n = n + 1 Print Option1(n).Caption End Sub 程序运行时,单击其中一个单选按钮,则在窗体上显示的是 ________ 。
Option Base 1Private Sub Command1_Click()Dim a$(), s$s = InputBox(\请输入用英文逗号分开的数据\)a = Split(s, \,\)Print a(Ubound(a)+Lbound(a)-1)End Sub程序运行后,单击命令按钮,在输入对话框中输入12,A,2,b,c则输出结果是()。
执行下面的程序,在窗体上显示的输出结果的第一行是____,第二行是____. Option explicit Private sub form_click() Dim I as integer, j as integer J=10 For I=1 to j I = I+1 J = j - i Next I Print I Print j End Sub
下列程序:Option Base 1Private Sub Form_Click()Dim a(5,5)For i = 1 To 5For j = 1 To 5k = k + 1a (i,j)= kNext jNext iFor i = 1 To 5s = s + a (i,i)Next iPrint sEnd Sub运行时的输出结果是( )。
阅读下列程序: Sub Med(x%,ByVal y%) x=3*x y=x+y End Sub Private Sub Form_Click() Dim a%,b% a=3 b=8 Med a,b Print a,b End Sub
在窗体上画一个命令按钮(其Name属性为Command1),然后编写如下代码;Option Base 1Private Sub Com
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:Option Base 1Private Sub Comma
在窗体上面一个命令按钮(其Name属性为Command1),然后编写如下代码:Option Base 1Private Sub Cor
阅读如下程序; Private Sub Form. Click() msg1$=“继续吗?” msg2$=“操作对话框” r=MsgBox(msg1$,vbYesNo OrvbDefaultButton2,msg2$) End Sub 程序运行后,单击窗体,将产生一个信息框。此时如果直接按回车键,则相当于用鼠标单击信息框中的【 】按钮。
在窗体上画一个名为Command1的命令按钮,然后编写如下程序: Option Base 1 Private Sub Command1_ Click()Dim arrarr = Array(358, 32, 46, 73, 23, 59, 26, 91, 583, 12)For i = ______ For j = ______ If arr(i) >= arr(j) Then a = arr(j
执行下面程序,第一行输出结果是 (11) ,第二行输出结果是 (12) 。 Option Explicit Private Sub Form_Click() Dim A As Integer A=2 Call Subl(A) End Sub Private Subl(x As Integer) x=x*2+1 If x<10 Then Call Subl(x) End If x=x*2+1 Pri
在窗体上画一个名称为Command1的命令按钮。编写如下程序: Option Base1 Private Sub Command1_Click() Dim a(10) As Integer For i=1 To 10 a(i)=i Next Call swap((11) ) For i=1 To 10 Print a(i); Next End Sub Sub swap(b()As Integer
以下的输出结果是 Option Base 1 Private Sub Command1_Click()Dim a(),p(3)
有如下程序:Option Base 1Private Sub Form Click()Dim arr,SumSum=0 arr=Array(1,3,5,7,9,11,13,15,17,19)For i=1 To 10If arr(i)/3=arr(i)//3 ThenSum=Sum+arr(i) En
在窗体上画一个名为Command1的命令按钮,然后编写如下程序: Option Base 1 Private Sub Command1_ Click() Dim arr arr = Array(358, 32, 46, 73, 23, 59, 26, 91, 583, 12) For i = ______ For j = ______ If arr(i) >= arr(j) Thena = arr
以下程序的功能是,产生10个0~1000的随机整数,放入数组Art中,然后输出其中的最大值。请填空。 Option Base 1 Private Sub Form Click() Dim Arr(10)As Integer Dim Max As Integer Randomize For i=1 To 10 Arr(i)=Int(Rnd*1000) Next i Max= (14) For i=
阅读程序: Option Base 1 Private Sub Form_Click() Dima(3)As Integer Print"输入的数据是:"; Fori=1 To 3 a(i)=InputBox(“输入数据”) Printa(i); Next Print If a(1)<a(2) Then t=a(1) a(1)=a(2) a(2)= [10] End If Ifa(2)>a(3)T
窗体上有一个名称为Combo1的组合框, 其初始内容为空,有一个名称为Command1、标题为“添加项目”的命令按钮。程序运行后,如果单击命令按钮,会将给定数组中的项目添加到组合框中,如图所示。请填空。 Option Base 1 Private Sub Command 1_ Click(Dim city As Variant city=_【6】_("北京","天津","上海","武汉","重庆
在窗体上画一个名称为Text1的文本框,然后画三个单选按钮,并用这三个单选按钮建立一个控件数组,名称为Option1。程序运行后,如果单击某个单选按钮,则文本框中的字体将根据所选择的单选按钮切换。请填空。 Private Sub Option1_Click(Index As Integer)Select Case 【10】 Case 0 a=“宋体” Case 1 a=“黑体” Case 2 a=
在窗体上画一个名称为Command1的命令按钮,然后编写如下程序: Option Base 1 Private Sub Command1_Click() Dim a(10)As Integer For i=1 To 10a(i)=i Next Call swap(【13】 ) For i=1 To 10Print a(i); Next End Sub Sub swap(b()As Integer
在窗体上面两个名称分别为Command1和Command2、标题分别为“初始化”和“求和”的命令按钮。程序运行后,如果单击“初始化”命令按钮,则对数组a的各元素赋值;如果单击“求和”命令按钮,则求出数组a的各元素之和,并在文本框中显示出来。请填空。 Option Base 1 Dim a(3,2) As Integer Private Sub Command1_Click() For i=1 To