网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
设有如下程序: Option Base 0 Private Sub Form_Click() Dim a Dimi 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 程序运行后,单击窗体,则在窗体上显示的是______。
A.4 3 2 1
B.5 4 3 2
C.6 5 4 3
D.7 6 5 4
参考答案
更多 “ 设有如下程序: Option Base 0 Private Sub Form_Click() Dim a Dimi 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 程序运行后,单击窗体,则在窗体上显示的是______。A.4 3 2 1B.5 4 3 2C.6 5 4 3D.7 6 5 4 ” 相关考题
考题
设有如下程序: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 IEnd Sub程序运行后,单击窗体,则在窗体上显示的是( )。
A.4321B.5432C.6543D.7654
考题
阅读程序Option Base 1Private Sub Form_Click()Dim arr,SumSum = 0arr = 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)End IfNext iPrint SumEnd Sub程序运行后,单击窗体,输出结果为( )。A.13B.14C.27D.15
考题
有以下程序:Option Base 1Dim arr() As IntegerPrivate Sub Form_Click()Dim i As Integer,j As IntegerReDim arr(3,2)For i=1 To 3For j=1 To 2arr (i,j)=i*2+jNext jNext iReDim Preserve arr(1,4)For j=3 To 4Arr(3,j)=j+9Next jPrint arr(3,2);arr(3,4)End Sub程序运行后,单击窗体,输出结果为( )。 A.8 13B.0 13C.7 12D.0 0
考题
执行以下语句过程,在窗体上显示的内容是Option Base 0Private Sub Command3_Click()Dim dd=Array("a", "b", "c", "d")Print d(1) ; d(3)End Sub( )。A.abB.bdC.acD.出错
考题
( 24 )有以下程序:Option Base 1Dim arr() As IntegerPrivate Sub Form_Click()Dim i As Integer, j As IntegerReDim arr(3, 2)For i = 1 To 3For j = 1 To 2arr(i, j) = i * 2 + jNext jNext iReDim Preserve arr(3, 4)For j = 3 To 4arr(3, j) = j + 9Next jPrint arr(3, 2); arr(3, 4)End Sub程序运行后,单击窗体,输出结果为A ) 8 13B ) 0 13C ) 7 12D ) 0 0
考题
在窗体上面画一个命令按钮,然后编写如下事件过程______ 。 Option Base 1 Private Sub Command1_Click() Dim a a=Array(1,2,3,4) j=1 For i=4 TO 1 Step -1 s=s+ a(i)*j j=j*10 Next i Print s End Sub运行上面的程序,单击命令按钮,其输出结果是______ 。A.4321B.12C.34D.1234
考题
设有如下程序:Option Base 1Private Sub Command1_Click()Dim arr1Dim Min As Integer, i As Integerarr1 = Array(12, 435, 76, -24, 78, 54, 866, 43)Min = ______For i = 2 To 8If arr1(i) Min Then______NextPrint "最小值是:"; MinEnd Sub以上程序的功能是:用Array函数建立一个含有8个元素的数组,然后查找并输出该数组中各元素的最小值。请填空。
考题
阅读程序:Option Base 1Dim arr() As IntegerPrivate Sub Form_Click()Dim i As Integer, j As IntegerReDim arr(3, 2)For i = 1 To 3For j = 1 To 2arr(i, j) = i * 2 + jNext jNext iReDim Preserve arr(3, 4)For j = 3 To 4arr(3, j) = j + 9Next jPrint arr(3, 2) + arr(3, 4)End Sub程序运行后,单击窗体,输入结果为( )。A.21B.13C.8D.25
考题
运行下列程序,单击窗体后输出的结果是( )。Private Sub Form_Click()Dim aDim s As Integer, i As Integera = Array(1, 2, 3, 4, 5, 6)s = 1For i = 5 To 1 Step -2s = s * a(i)Next iPrint sEnd SubA、 15B、 48C、 120D、 720
考题
有如下程序:Option Base 1Private Sub Form_Click()Dim arr, SumSum = 0arr = 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)End IfNext iPrint SumEnd Sub程序运行后,单击窗体,输出结果为( )。A.25B.26C.27D.28
考题
有如下程序:Option Base 1Private Sub Form_Click()Dim arr,SumSum=0For i=1 To 10If arr(i)/3=arr(i)\3 ThenEnd IfNext iEnd Sub程序运行后,单击窗体,消息框的输出结果为( )。
考题
设有如下程序段,其功能是查找并输出该数组中的最小值。请在空白处填入适当的内容,将程序补充完整。Option Base 1Private Sub Command1_Click()Dim arr1Dim Min As Integer, i As Integerarr1 = Array(12, 435, 76, -24, 78, 54, 866, 43)Min = arr1(1)For i=2 To 8If arr1(i)<Min ThenNext iPrint "最小值是:"; MinEnd Sub
考题
阅读程序: Option Base 1 Dim art()As Integer Private Sub Form_Click() Dim i As Integer,j As Integer ReDim arr(3,2) For i=1 To 3 For j=1 To 2 arr(i,j)=i*2+j Next Next ReDim Preserve ale(3,4) For j=3 To 4 arr(3,j)=j+9 Next Print arr(3,2)+arr(3,4) End Sub 程序运行后,单击窗体,输出结果为A.21B.13C.8D.25
考题
设有如下程序: Option Base 1 Private Sub Form. Click() Dim arr arr = Array(10, 20, "ABCDE") For i = 3 To 1 Step -1 Print arr(i); Next i End Sub程序运行后,单击窗体,在窗体上显示的内容为______。A.ABCDE 20 10B.10 20 ABCDEC.ABCDE 10 20D.出错信息
考题
设有如下程序: 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 程序运行后,单击窗体,则在窗体上显示的是( )。A.4 3 2 1B.5 4 3 2C.6 5 4 3D.7 6 5 4
考题
执行下面程序,第一行输出结果是【 】,第二行输出结果是47。Option ExplicitPrivate Sub Form_Click( )Dim A As IntegerA=2Call Sub1 (A) End SubPrivate Sub1 (x As Integer)x=x*2+1If x<10 ThenCall Sub1 (x)End Ifx=x*2+1Print xEnd Sub
考题
设有如下程序: 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 程序运行后,单击窗体,则在窗体上显示的是A.4 3 21B.543 2C.6 54 3D.7 6 54
考题
执行以下语句过程,在窗体上显示的内容是Option Base 0Private Sub Command3_Click()Dim dd=Array("a","b","c","d")Print d(1);d(3)End SubA.abB.bdC.acD.出错
考题
在窗体上画一个文本框,然后编写如下代码: Option Base 1 Private Sub Form_Click() Dim arr Dim Start As Integer,Finish As Integer Dim Sum As Integer arr=Array(12,4,8,16) Start=Lbound(arr) Finish=Ubound(arr) Sum=0 For i=Start To Finish Sum=Sum+arr(i) Next i c=Sum/Finish Text1.Text=c End Sub 程序运行后,单击窗体,则在文本框中显示的内容是A.40B.10C.12D.16
考题
在窗体上添加一个命令按钮,名称为Commandl,然后编写如下事件过程: Option Base 0Private Sub Commandl_Click() Dim cityAs VariantCity=.Array("北京", "上海","天津”, "重庆")Print city(1)End Sub程序执行后,如果单击命令按钮,则在窗体上显示的内容是( )。A.空白B.错误提示C.北京D.上海
考题
有如下程序: 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
考题
设有如下程序: Private Sub Form_ Click() Dim a Dim i As Integer, j 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程序运行后,单击窗体,则在窗体上显示的是______。。A.4 3 2 1B.5 4 3 2C.6 5 4 3D.7 6 5 4
考题
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: option Base 1 Private Sub Command1_Click() Dim a a=Array(1, 2, 3, 4, 5) For i=1 To UBound(a)a(i)=a(i)+i-1 Next Print a(3) End Sub 程序运行后,单击命令按钮,则在窗体上显示的内容是______。A.4B.5C.6D.7
考题
设有如下程序: 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 程序运行后,单击窗体,则在窗体上显示的是A.4 3 2 1B.54 3 2C.6 5 4 3D.7 6 5 4
考题
设有如下程序: 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 程序运行后,单击窗体,则在窗体上显示的是()A、4;3;2;1B、5;4;3;2C、6;5;4;3D、7;6;5;4
考题
设有如下程序: Private Sub Command1_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 I End Sub 程序运行后,单击窗体,则在窗体上显示的是()A、4321B、5432C、6543D、7654
考题
单选题设有如下程序: 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 程序运行后,单击窗体,则在窗体上显示的是()A
4;3;2;1B
5;4;3;2C
6;5;4;3D
7;6;5;4
热门标签
最新试卷