Option Base 1
Private Sub Command1_Click()
D.im arrl
D.im Min As Integer,i As Integer
arrl=Array(12,435,76,-24,78,54, 866, 43)
Min=____
F.or i=2 To 8
If arrl(i)<Min Then
Next i
Print “最小值是:”;Min
E.nd Sub
以上程序的功能是:用Arcay函数建立一个含有8个元素的数组,然后查找并输出该数组中各元素的最小值。请填空。
[单选题]设有如下程序: Option Base 1 Private Sub Command1_Click() Dim a(10) As Integer Dim n As Integer n=InputBox("输入数据") If n<10 Then Call GetArray(a,n) End If End Sub Private Sub GetArray(b()As Integer,n As Integer) Dim c(10)As Integer j=0 For i=1 To n b(i)=Cl
[单选题]设有如下程序: Option Base 1 Private Sub Command1_Click( ) Dim a(10) As Integer Dim n As Integer n=InputBox(“输入数据”) If n<10 Then Call GetArray(a,n) End If End Sub Private Sub GetArray(b( )As Integer,n As Integer) Dim c(10) As Integer j=0 For i=1 To n b(i
[单选题]有如下程序:Option base 1Private Sub Command1_ClickD.im arr(10)A.rr=Array(10,35,28,90,54,68,72,90)F.or Each a In arrIf a>50 thenSum=sum+aE.nd IfNext aE.nd Sub运行上述程序时出现错误,错误之处是A.)数组定义语句不对,应改为Dim arrB.)没有指明For 循环的终值C.)应在For语句之前增加sum=0D.)Next a 应改为next
[单选题]设有如下程序: Dption Base 1 Private Sub Command1_Click() Dim a(10)As Integer Dim n As Integer n=InputBox("输入数据") If n<10 Then Call GetArray(a, n) End If End Sub Private Sub GetArray(h()As Integer, n As Integer) Dim c(10)As Integer j=0 For i=1 To n b(i)=C
[单选题]设有如下程序:Option Base 0Private Sub Form_Click()Dim aDim i As Integera = Array(1,2,3,4,5,6,7,8,9)For i = 0 To 3Print a(5 – i);Next End Sub程序运行后,单击窗体,则在窗体上显示的是()A . 4;3;2;1B . 5;4;3;2C . 6;5;4;3D . 7;6;5;4
[主观题]有如下程序:Option Base 1Private Sub Form_Click()D.im arr,SumSum=0F.or i=1 To 10If arr(i)/3=arr(i)/3 ThenE.nd IfNext iE.nd Sub程序运行后,单击窗体,消息框的输出结果为( )。
[单选题]有如下程序: Option Base 1 Private Sub Form. Click() Dim arr,Sum Sum=0 alt=Array(1,3,5,7,9,11,13,15,17,19) For i=1 To 10 If arr(i)/3=arr(i)/3 Then Sum=Sum+arr(i) End If Next i Print Sum End Sub 程序运行后,单击窗体,输出结果为______。A. 25B.26C.27D.28
[单选题]有如下程序: Option Base 1 Private Sub Form_Click() Dim arr,Sum Sum=0 alt=Array(1,3,5,7,9,11,13,15,17,19) For i=1 To 10 If arr(i)/3=arr(i)13 Then Sum=Sum+alt(I) End If Next i Print Sum End Sub 程序运行后,单击窗体,输出结果为______。A.25B.26C.27D.28
[单选题]有如下程序: Option Base 1 Private Sub Form_Click() Dim arr, Sum Sum=0 arr=Array(1, 3, 5, 7, 9, 11, 13, 15, 17, 19) For i=1 To 10 If arE(i)/3=arr(i)/3 Then Sum=Sum+arr(i) End If Next i Print Sum End Sub 程序运行后,单击窗体,输出结果为______。A.25B.26C.27D.28
[单选题]设有如下程序 Private Sub Command1_Click() Dim sum As Double, x As Double sum=0 n=0 For i=1 To 5 x=n/i n=n+1 sum=sum +x Next i End Sub 该程序通过For循环来计算一个表达式的值,这个表达式是______。A.1+1/2+2/3+3/4+4/5B.1+1/2+1/3+1/4+1/5C.1/2+2/3+3/4+4/5D.1/2+1/3+1/4+1/5