设有如下程序:Option Base 1Private Sub Commandl Click()Dim arrlDim Min As Integer,i As Integerarrl=Array(12,435,76,-24,78,54,866,43)Min=【 】For i=2 To 8If arrl(i)<Min Then【 】NextPrint"最小值是:";MinEnd Sub以上程序的功能是:用Array函数建立一个含有8个元素的数组,然后查找并输出该数组中各元素的最小值。请填空。

设有如下程序:

Option Base 1

Private Sub Commandl Click()

Dim arrl

Dim Min As Integer,i As Integer

arrl=Array(12,435,76,-24,78,54,866,43)

Min=【 】

For i=2 To 8

If arrl(i)<Min Then【 】

Next

Print"最小值是:";Min

End Sub

以上程序的功能是:用Array函数建立一个含有8个元素的数组,然后查找并输出该数组中各元素的最小值。请填空。


相关考题:

在窗体上画一个名称为Commandl的命令按钮,然后编写如下程序:Private Sub Commandl_Click()Dimi As Integer,j As IntegerDima(10,10)As IntegerFori=1 To 3Forj=1 To 3a(i,j)=(i-1)*3+jPrinta(i,j);NextjPrintNextiEnd SubA.B.C.D.

设有如下程序:Private Sub Form_Click()Dim i As Integer,x As String,Y As Stringx=”ABCDEFG”For i=4 To 1 Step-1y=Mid(x,i,i)+yNext iPrint yEnd Sub程序运行后,单击窗体,输出结果为A.ABCCDEDEFGB.AABBCDEFGC.ABCDEFGD.AABBCCDDEEFFGG

设有如下程序: Private Sub Form. Click( ) Dim i As Integer,x As String,y As String x="ABCDEFG" For i=4 To 1Step-1 y=Mid(X,i,i)+y Next i Print y End Sub 程序运行后,单击窗体,输出结果为( )。A.ABCCDEDEFGB.AABBCDEFGC.ABCDEFGD.AABBCCDDEEFFGG

设有如下通用过程:Pubfic Function Fun(xStr As String)As StringDim tStr As String,strL As Integertstr=“”strL=Len(xStr)i=1Do While i=strL/2tStr=tStr&Mid(xStr,i,1)&Mid(xStr,strL-i+1,1)i=i+1LoopFun=tStrEndFunction在窗体上画一个名称为Commandl的命令按钮。然后编写如下的事件过程:Private Sub Commandl_Click()Dim S1 As StringS1=“abcdef”Print UCase(Fun(S1))End Sub程序运行后,单击命令按钮,输出结果是A.ABCDEFB.abedefC.AFBECDD.DEFABC

在窗体中添加一个名称为Commandl的命令按钮,然后编写如下程序:Pfivme Sub f(ByVal x As Integer)x=x+4End SubPfivate Sub Commandl_Click()i=3Call f(i)Ifi4 Then i=i*2MsgBOx IEnd Sub窗体打开运行后,单击命令按钮,则消息框的输出结果为______。

设有如下程序:Private Sub Form—Click()Clsa$=“ABCDFG”For i=1 T0 6Print Tab(12-i);【 】NextiEnd Sub程序运行后,单击窗体,结果如图所示,请填空。

在窗体上面一个名称为Commandl的命令按钮,然后编写如下程序: Option.Base 1 Private Sub Command1_Click() Dim a As Variant a=Array(1,2,3,4,5) Sum = 0 For i = 1 To 5 Sum=Sum+a(i) Next i x=Sum/5 For i=1 To 5 If a(i) >x Then Print a(i); Next i End Sub 程序运行后,单击命令按钮,在窗体上显示的内容是A.1 2B.1 2 3C.3 4 5D.4 5

在窗体上画一个命令按钮,名称为Commandl,然后编写如下事件过程: Private Sub Commandl_Click() Dim() a=Array(”机床”,”车床”,”钻床”,”轴承”)Printa(2)EndSub程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。A.机床B.车床C.钻床D.轴承

设有如下程序: Private Sub Form. Click( ) Dim i As Integer,x As String,y As String x=ABCDEFGFor i=4 To 1Step-1y=Mid(X,i,i)+yNext iPrint yEnd Sub程序运行后,单击窗体,输出结果为( )。A.ABCCDEDEFGB.AABBCDEFGC.ABCDEFGD.AABBCCDDEEFFGG

9)设有如下程序:Private Sub Form_Click( )Clsa$="ABCDFG"For i=1 To 6Print Tab(12-i); 【9】Next iEnd Sub程序运行后,单击窗体,结果如图所示,请填空。