单选题设有如下程序: 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 程序运行后,单击窗体,则在窗体上显示的是()A4;3;2;1B5;4;3;2C6;5;4;3D7;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;1
B
5;4;3;2
C
6;5;4;3
D
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
列程序的功能是:将数据1,2,…,10写入顺序文件Base.txt中,请填空。Private Sub Form_Click()Dim i As IntegerOpen 【11】 As #1For i=1 To 10【12】Next iClose #1End Sub
有如下程序:Private Sub Form_Click()Dim i As Integer,Sum As IntegerSum=0For i=2 To 10If i Mod 2<>0 And i Mod 3=0 ThenSum=Sum+iEndIfNextPrint SumEnd Sub程序运行后,单击窗体,输出结果为A.12B.30C.24D.18
设有如下程序:Private Sub Form_Click()Dim n As Integer, s As Integern = 8s = 0Dos = s + nn = n - 1Loop While n 0Print sEnd Sub以上程序的功能是______。程序运行后,单击窗体,输出结果为______。
设有如下程序: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.出错信息
有如下程序: Private Sub Form_Click() Dim i As Integer,Sum As Integer Sum=0 For i=2 To 10 If i Mod 2<>0 And i Mod 3=0 Then Sum=Sum+i End If Next Print Sum End Sub 程序运行后,单击窗体,输出结果为A.12B.30C.24D.18
有如下程序:Private Sub Form_Click()Dim i As Integer, sum As Integersum = 0For i = 2 To 10If i Mod 2 0 And i Mod 3 = 0 Thensum = sum + iEnd IfNext iPrint sumEnd Sub程序运行后,单击窗体,输出结果为( )。A.12B.30C.24D.18
有如下程序: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 Swap (a() As IntegFor I=1 to 10\2t=a(I)a(I)=a(10-I+1)a(10-I+1)=tNext IEnd SubPrivate Sub Form_Click()Dim x(10) As IntegerFor I=1 to 10x(I)=I*2Next ISwap x()For I=1 to 10Print x(I)Next IEnd Sub
设有如下程序: Private Static Function Fac(n As Integer)As Integer Dim f As Integer f=f+n Fac=f End Function Private Sub Form_Click( ) Dim I As Integer For 1=2 To 3 Print"#";I“=”Fac(1) Next I End Sub 程序运行后,单击窗体,在窗体上显示的是A.#2=2 #3=3B.#2=2 #3=5C.#;2=2 #;3=3D.#;2=2 #3;=5
有如下程序: Private Sub Form_Click( ) Dim i As Integer, Sum As Integer Sum = 0 For i = 2 To 10 If i Mod 2=0 And i Mod 3<>0 Then Sum = Sum + i End If Next Print Sum End Sub 程序运行后,单击窗体,输出结果为A.12B.30C.24D.18
设有如下程序: 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
设有如下程序: 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
有如下程序: Private Sub Form_Click() Dim i As Integer, Sum As Integer sum=0 For i=2 To 10 If i Mod 2<>0 And i Mod 3=0 Then sum=sum+i End If Next i Print sum End Sub 程序运行后,单击窗体,输出结果为______。A.12B.30C.24D.18
在窗体上画一个文本框,然后编写如下代码: 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
编写如下事件过程: Option Base 1 Private Sub Form Click() Dim x1()As Integer Dim i As Integer Dim s As Integer ReDim x1(3) For i = 1 To UBound(x1) x1(i)=i + 1 Next i Call sub1(x1) For i = 1 To UBound(x1) s = s + x1(i) Next i Print s End Sub Private Sub sub1(n()As Integer) Dim i As Integer ReDim Preserve n(5) For i = 3 To 5 n(i)=n(i-1)*2 Next i End Sub 程序运行后,单击窗体,则窗体上显示的内容是A.6B.12C.24D.47
在窗体上画一个文本框,然后编写如下程序: Option Base 1 Private Sub Form_Click() Dim Arr(10)As Integer For i=6 To 10 Arr(i)=i-3 Next i Text1.Text:Str(Arr(6)+Arr(Arr(6)+Arr(10))) End Sub 程序运行后,单击窗体,在文本框中显示的内容是A.1B.3C.6D.10
有如下程序:Private Sub Form_Click()Dim i As Integer, Sum As IntegerSum=0For i=2 To 10If i Mod 2=0 And i Mod 30 ThenSum=Sum+iEnd IfNextPrint SumEnd Sub程序运行后,单击窗体,输出结果为A.12B.30C.24D.18
有如下程序: 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.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