网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

设有如下程序: 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 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 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

考题 在窗体上画一个名称为Command1的命令按钮,然后编写如下程序: Private Sub Command1 Click() Dim i As Integer,j As Integer Dim a(10,10)As Integer For i=1 To 3 For j=1 To 3 a(i,j)=(i-1)*3+j Print a(i,j); Next j Print Next i End Sub 程序运行后,单击命令按钮,窗体上显示的是______。A.1 2 3 2 4 6 3 6 9B.2 3 4 3 4 5 4 5 6C.1 4 7 2 5 8 3 6 9D.1 2 3 4 5 6 7 8 9

考题 在窗体上画—个命令按钮(其名称为Command1),然后编写如下事件过程: Private Sub Command1_Click() Dim a(5,5)As Integer Dim i As Integer,j As Integer For i=1 To 3 For j=1 To 3 a(i,j)=(i-1)*3+j Print a(i,j) Next j Print Next i End Sub 程序运行后,单击命令按钮,在窗体上的输出结果是:_______。A.1 4 7 2 5 8 3 6 9B.1 2 3 4 5 6 7 8 9C.1 2 3 4 5 6 7 8 9D.没有输出

考题 阅读程序: Private Sub Command1_Click( ) Dim arr Dim i As Integer arr=Array(0,1,2,3,4,5,6,7,8,9,10) For i=0 To 2 Print arr(7-i); Next End Sub 程序运行后,窗体上显示的是( )。A.8 7 6B.7 6 5C.6 5 4D.5 4 3

考题 在窗体中添加一个名称为Command1的命令按钮,然后编写如下代码: Function F(a As Integer) b=0 Static c b=b+1 c=c+1 F=a+b+c End Function Private Sub Command1 Click() Dim a As Integer Dim b As Integer a=2 For i=1 To 3 b=F(A) Print b Next i End Sub 程序运行后,如果单击按钮,则在窗体上显示的内容是A.4 4 4B.4 5 6C.5 6 7D.5 5 5

考题 设有如下程序: 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

考题 在窗体上画一个名称为Command1的命令按钮,然后编写如下程序: Private Sub Command1_Click( ) Dim i As Integer,j As Integer Dim a(10,10)As Integer For i=1 To 3 For j=1 To 3 a(i,j)=(i-1)*3+j Print a(i,j); Nextj Print Next i End Sub 程序运行后,单击命令按钮,窗体上显示的是A.1 2 3 24 6 3 6 9B.2 3 4 3 4 5 4 5 6C.1 4 7 2 5 8 3 6 9D.1 2 3 4 5 6 7 8 9

考题 设有如下程序: Private Sub Form_Click() A=1 For i=1 To 3 Select Case i Case 1,3 A=A+1 Case 2,4 A=A+2 End Select Next i Print A End Sub 程序运行后,单击窗体,则在窗体上显示的内容是A.6B.5C.4D.3

考题 阅读程序:Private Sub Commandl一Click()Dim arrDim i AS Integerarr=Array(0,1, 2,3,4,5,6,7,8,9,10)For i=0 To 2Print arr(7-i);NextEnd Sub程序运行后,窗体上显示的是:A.8 7 6B.7 6 5C.6 5 4D.5 4 3

考题 设有如下程序: 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

考题 在窗体上面一个名称为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

考题 在窗体上画一个名称为Comlnalld1的命令按钮,然后编写如下程序: Private Sub Command1 Click() Dim i As Integer,j As Integer Dim a(10,10)As Integer For i=1 TO 3 For j=1 TO 3 a(i,j)=(i-1)*3+j Print a(i,j); Next j Print Next i End Sub 程序运行后,单击命令按钮,窗体上显示的是( )。A.1 2 3 2 4 6 3 6 9B.2 3 4 2 4 5 4 5 6C.1 4 7 2 5 8 3 6 9D.1 2 3 4 5 6 7 8 9

考题 在窗体上画一个名称为Commandl的命令按钮,然后编写如下程序: Private Sub Command1_Click() Dim i As Integer,j As Integer Dim a(10, 10)As Integer For i=1 To 3 For i=1 To 3 a(i,j)=(i-1) *3+j Print a(i,j); Next i Print Next i End Sub 程序运行后,单击命令按钮,窗体上显示的是A.1 2 3 246 3 69B.2 3 4 3 4 5 4 5 6C.1 4 7 2 5 8 3 6 9D.1 2 3 4 5 6 7 8 9

考题 在窗体上画一个名称为CoilTlilandl的命令按钮,然后编写如下事件过程: Private Sub command1 Click() Dim m As Integer, i As Integer, x(3)As Integer For i=0 To 3:x(i)=i:Next i For i = 1 To 2: Call sub1(x,i):Next i For i = 0 To 3: Print x(i);: Next i End Sub Private Sub sub1(a()As Integer,k As Integer) Dim i As Integer Do a(k)=a(k)+a(k+1) j = j + 1 Loop While j < 2 End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.0 3 7 5B.0 1 2 3C.3 2 4 5D.0 5 8 3

考题 阅读如下程序: Option Base 1 Private Sub Form Click() Dim Arr(4,4)As Integer For i=1 To 4 For j=1 To 4 Arr(i,j)=(i-1)*2+j Next j Next i For i=3 To 4 For j=3 To 4 Print Arr(j,i); Next j Print Next i End Sub 程序运行后,单击窗体,输出的结果为A.5 7 6 8B.6 8 7 9C.7 9 8 10D.8 10 8 11

考题 在窗体上画一个名称为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

考题 在窗体上画一个名称为Conunand1的命令按钮,然后编写如下程序: Private Sub Command1 Click() Dim i As Integer,j Aa Integer Dim a(10,10)As Integer For i=1 To 3 For j=1 To 3 a(i,j)=(i-1)*3+j Print a(i,j); Next j Print Next i End Sub 程序运行后,单击命令按钮,窗体上显示的是( )。A.1 2 3 2 4 6 3 6 9B.2 3 4 2 4 5 4 5 6C.1 4 7 2 5 8 3 6 9D.1 2 3 4 5 6 7 8 9

考题 阅读下列程序: Private Sub Form Click() Dim i As Integer, sum As Integer For i = 2 To 10 If i Mod 2 <> 0 Then Print i; Else sum = sum + i End If Next i Print sum End Sub 程序运行后,单击窗体,在窗体上的输出结果是A.3 5 7 9 30B.1 3 5 7 9C.2 4 6 8 20D.11 15 17 19 20

考题 设有如下程序: Private Sub Form. Click( ) Dim ary(1 To 5)As Integer Dim i As Integer Dim sum As Integer For i=1 To 5 ary(i)=i+l sum=sum+ary(i) Next i Print sum End Sub 程序运行后,单击窗体,则在窗体上显示的是( )。A.15B.16C.20D.25

考题 设有如下程序: 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

考题 设有如下程序: 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 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

考题 设有如下程序: 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

考题 设有如下程序: 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