网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
设有如下程序: 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 1
B.54 3 2
C.6 5 4 3
D.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.54 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
考题
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:Option Base 1Private Sub Command1_Click()Dim aa= Array(1,2,3,4,5)For i=1 To UBound(a)a(i)= a(i)+i-1NextPrint a(3)End Sub程序运行后,单击命令按钮,则在窗体上显示的内容是( )。A.4B.5C.6D.7
考题
阅读程序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 0Private Sub Command3_Click()Dim dd=Array("a", "b", "c", "d")Print d(1) ; d(3)End Sub( )。A.abB.bdC.acD.出错
考题
设有如下程序: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个元素的数组,然后查找并输出该数组中各元素的最小值。请填空。
考题
运行下列程序,单击窗体后输出的结果是( )。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
考题
设有如下程序: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
考题
下列程序运行时输出的结果是( )。 Option Base 1 Private Sub Form_Click() Const a=6 Dim x (a) As Integer For I=1 to a x(i)=1^2 Next I Print x(i) End SubA.36B.25C.1D.出错信息
考题
有如下程序: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 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
考题
在窗体上画一个名为Command1的命令按钮,然后编写如下程序: Option Base 1 Private Sub Command1_Click() Dim Arr Arr = Array(1,2,3,4,5) j=1 For i = 5 To 1 Step -1 S = S + Art(i) * j j =j * 10 Next Print S End Sub 程序运行后,单击命令按钮,输出结果为( )。A.54321B.123C.12345D.345
考题
设有如下程序: 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 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个元素的数组,然后查找并输出该数组中各元素的最小值。请填空。
考题
在窗体上面一个名称为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
考题
有如下程序: 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 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
考题
阅读程序: 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 arr(i)/3=arr(i)\3 Then Sum=Sum+arr(i) End If Next i Print Sum End Sub程序运行后,单击窗体,输出结果为A.13B.14C.27D.15
考题
在窗体上添加一个命令按钮,名称为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
考题
设有如下程序: 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 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
热门标签
最新试卷