在窗体上添加一个命令按钮Command1,然后编写如下代码: Option Base 1 Private Sub Command1_click() Dim arr(4) As Integer Dim arr1(4) As Integer n = 3 For i = 1 To 4 arr(i) = i arr1(n) = 2 * n + i Next i Print arr1(n); arr(n) End Sub 程序的运行结果为()。A.3 11B.11 3C.10 3D.3 13
在窗体上添加一个命令按钮Command1,然后编写如下代码: Option Base 1 Private Sub Command1_click() Dim arr(4) As Integer Dim arr1(4) As Integer n = 3 For i = 1 To 4 arr(i) = i arr1(n) = 2 * n + i Next i Print arr1(n); arr(n) End Sub 程序的运行结果为()。
A.3 11
B.11 3
C.10 3
D.3 13
参考答案和解析
C
相关考题:
在窗体上添加一命令按钮,其名为Command1,然后编写代码如下:private Sub Command1_Click()Dim an(5) As Integer,arrl(5) As Integern=3For i=1 To 5arr(i)=iarrl(n)=2*n+iNextPrint arrl(n);arr(n)End Sub程序的运行结果为A.3 11B.11 3C.13 3D.3 13
设有如下通用过程: Public Sub Fun(a() As Integer, x As Integer) For i=1 To 5 x=x+a(i) Next End Sub 在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮。然后编写如下的事件过程: Private Sub Command1_Click() Dim arr(5)As Integer, n As Integer For i=1 To 5 art(i)=i+i Next Fun arr, n Text1. Text=Str(n) End Sub 程序运行后,单击命令按钮,在文本框中显示的内容是______。A.30B.25C.20D.15
阅读程序: Option Base 1 Dim arr()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 j Next i ReDim Preserve arr(3,4) For j=3 To 4 arr(3,j)=j+9 Next j Print arr(3,2)+arr(3,4) End Sub 程序运行后,单击窗体,输入结果为______。A. 21B.13C.8D.25
设有如下通用过程: Public Sub Fun(a()As Integer,x As Integer) For i=1 To 5 x=x+a(i) Next End Sub 在窗体上画一个名称为Text1的文本框和一个名称为Commandl的命令按钮。然后编写如下的事件过程: Private Sub Commandl_Click() Dim arr(5)As Integer,n As Integer For i=1 To 5 arr(i)=i+i Next Fun arr,n Text1.Text=Str(n) End Sub 程序运行后,单击命令按钮,则在文本框中显示的内容是______。A. 30B.25C.20D.15
设有如下通用过程:Public Sub Fun(a() As Integer, x As Integer)For i = 1 To 5x = x + a(i)NextEnd Sub在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮。然后编写如下的事件过程:Private Sub Command1_Click()Dim arr(5) As Integer, n As IntegerFor i = 1 To 5 arr(i) = i + iNext Fun arr, n Text1.Text = Str(n)End Sub程序运行后,单击命令按钮,则在文本框中显示的内容是( )。A.30B.25C.20D.15
在窗体上添加一命令按钮,其名为Command1,然后编写代码如下: private Sub Command1_Click() Dim arr(5)As Integer,arr1(5)AS Integer n=3 For i=1 To 5 arr(i)=i arr1(n)=2*n+i Next Print arr1(n);art(n) End Sub 程序的运行结果为A.3 11B.11 3C.13 3D.3 13
在窗体上画一个命令按钮Commandl,然后编写下列代码: Private Sub Commandl_Click() Dim Arrl(10)As Integer,Arr2(10)As Integer n=3 For i=1 To 5 Arrl(i)=i Arr2(n)=2*n+1 Next i Print Arr2(n);Arrl(n) End Sub 运行程序后,单击命令按钮,输出结果是A.11 3 B.3 11 C.13 3 D.3 13
(11)设有下列程序查找并输出该数组中的最小值,请在空白处填上合适的代码,将程序补充完整。 Option Base 1 Private Sub Command1_Click() Dim arr1 Dim Min As Integer,i As Integer Arr1=Array(12,435,76,-24,78,54,866,43) Min=arr1(1) For i=2 To 8 If arr1(1)Min Then Next i Print"最小值:";Min End Sud
在窗体上画一个命令按钮Command1,然后编写下列代码:Private Sub Command1_Click()Dim Arr1(10) As Integer,Art2(10) As Integern=3For i=1 To 5Arr1(i)=iArr2(n)=2*n+iNext iPrint Arr2(n);Arr1(n)End Sub运行程序后,单击命令按钮,输出结果是( )。A.11 3B.3 11C.13 3D.3 13
在窗体上画一个命令按钮Command1,然后编写如下代码: Private Sub Command1_Click() Dim Arr1(10) As Integer, Arr2(10)As Integer n=3 For i = 1 To 5 Arr1 (i)=i Arr2(n)=2 * n+i Next i Print Arr2(n); Art1 (n)End Sub运行程序后,单击命令按钮,输出结果是( )。A.11 3B.3 11C.13 3D.3 13
设有如下通用过程: Public Sub Fun(a( )As Integer,x As Integer) For i=1 TO 5 x=x+a(i) Next End Sub 在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮。然后编写如下的事件过程: Private Sub Command1_Cliek( ) Dim arr(5) As Integer,n As Integer For i=1 To 5 arr(i)=i+i Next Fun arr,n Text1.Text=Str(n) End Sub 程序运行后,单击命令按钮,则在文本框中显示的内容是A.30B.25C.20D.15
以下有关数组定义的语句序列中,错误的是A.Static arrl(3) arr1(1)=100 arrl(2)="Hello" arrl(3)=123.45B.Dim arr2()As Integer Dim size As Integer Private Sub Command2_Click() size=InputBOX(“输入:”) ReDim arr2(size) ┄ End SubC.Option Base 1 Private Sub Command3_Click() Dim arr3(3)As Integer ┄ End SubD.Dim n As Integer Private Sub Command4_Click() Dim arr4(n)As Integer ┄ End Sub
以下有关数组定义的语句序列中,错误的是 ______。A.Static arr1(3) arr1(1)=100 arr1(2)="Hello" arr1(3)=12345B.Dim arr2()As Integer Dim size As Integer Private Sub Command2_Click() size=Input Box("输入:") ReDimarr2(size) ... End SubC.Option Base 1 Private Sub Command3_Click() Dim arr3(3)As Integer ... End SubD.Dim n As Integer Private Sub Command4_Click() Dim arr4(n)As Integer ... End 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
在窗体上画一个名称为command1的命令按钮,然后编写如下程序; Option Base 1 Private Sub Command1_Click() Dim arr(4)As String For i=1 To 4 arr(i) = Chr(Asc("A")+(i-1)) Next i For Each b1 In arr Print b1; Next End Sub 程序运行后,如果单击命令按钮,则在窗体上输出的内容为 ______。A.ABCDB.abcdC.出错信息D.1 2 3 4
在窗体上画一个命令按钮Command1,然后编写如下代码: Privae Sub Command1_Click() Dim Arr1(10) As Integer,Arr2(10) As Integer n=3 For i=1 To 5 Arr1(i)=i Art2(n)=2*n+i Next i Print Arr2(n);Arr1(n) End Sub 运行程序后,单击命令按钮,输出结果是( )。A.11 3B.3 11C.13 3D.3 13
在窗体上画一个命令按钮(其Name属性为Command1),然后编写如下代码: Private Sub Command1_Click() Dim Arr1(10)As Integer,arr2(10)As Integer n=3 For i=1 To 5 Arr1(i)=i arr2(n)=2*n+i Next i Print arr2(n);Arr1(n) End Sub 程序运行后,单击命令按钮,输出结果是 ______。A.11 3B.3 11C.13 3D.3 13
在窗体上添加一命令按钮,其名为Command1,然后编写代码如下。 private Sub Command1_Click() Dim arr(5)As Integer,arr1(5)As Integer n=3 For i=1 To 5 an(i)=i arrl(n)=2*n+i Next Print arr1(n);arr(n) End Sub 程序的运行结果为A.3 11B.11 3C.13 3D.3 13
在窗体上添加一个命令按钮,其名为Command1,然后编写代码如下:Option Base 1Private Sub command1_ Click() Dim arr (4)As Integer Dim arrt (4) As Integer for i= 1 To 4 Arr (i)= i arr1 (n)= 2 * n + i Next i Print arr1 (n); arr(n)程序的运行结果为______。A.3 11B.11 3C.10 3D.3 13
阅读程序: Option Base 1 Dim arr() As Integer Private Sub Form. Click() Dim i As Integer,i As Integer ReDim arr(3,2) For i=1 To 3 For j=1 To 2 arr(i,j)=i*2+j Next j Next i ReDim arr(3,2)+arr(3,4) End Sub 程序运行后,单击窗体,输出结果为A.21B.13C.8D.25
在窗体上添加一命令按纽,其名为Command1,然后编写代码如下: Private Sub Command1_Click() Dim arr (5)As Integer Dim arrl (5)As Integer n=3 For i=1 To 5 Arr (i)=i Arrl (n)=2*n+ i Next i Print arrl (n);arr (n) End Sub 程序的运行结果为:______。A. 3 11B.11 3C.13 3D.3 13
在窗体上添加一命令按钮,其名为Command1,然后编写代码如下。private Sub Command1_Click()Dim arr(5)As Integer,arr1(5)As Integern=3For i=1 To 5arr(i)=iarr1(n)=2*n+iNextPrint arr1(n);arr(n)End Sub程序的运行结果为A.3 11B.11 3C.13 3D.3 13
以下有关数组定义的语句序列中,错误的是A.Static arr1(3) Arr1l(1)=100 Arr1(2)=“Hello” Arr1(3)=123.45B.Dim art2( )As Integer Dim size As Integer Private Sub Command2_Click( ) size=Input Box(“输入:”) ReDinl.arr2(size) …… End SubC.Option Base 1 Private Sub Command3_Click( ) Dim arr3(3) As Integer …… End SubD.Dim n As Integer Private Sub Command4_Click( ) Dim arr(n) As Integer …… End Sub
在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为( )。 Option Base 1 Private Sub fun (a()As Integer,n As Integer) For i=1 To 2 t=a(i):a(i)=a(5-i+1):a(5-i+1)=t Next i End Sub Private Sub Command1_Click() Dim arr1(5)As Integer For i=1 To 5 arr1(i)=i Next i Call fun(arr1,5) Print arr1(1);arr1(2) End SubA.1 2B.2 1C.5 4D.4 5
在窗体上画一个命令按钮和一个文本框,其名称分别为Command1和Text1,然后编写如下事件过程: Private Sub Command1 Click() Dim arr1(10), arr2(10) For i = 1 To 10 arr1(i) = 3 * i arr2(i) = arr1(i) * 3 Next i Text1.Text = Str (arr2(i / 2 - 0.1)) End Sub程序运行后,单击命令按钮,在文本框中显示的是______。A.36B.45C.54D.63
设有如下通用过程: Public Sub Fun(a()As Integer,x As Integer) For i=1 To 5 x=x+a(i) Next End Sub 在窗体上绘制一个名称为Text1的文本框和一个名称为Command1的命令按钮。然后编写如下的事件过程: Private Sub Command1_Click() Dim arr(5) As Integer,n AsInteger For i=1 To 5 arr(i)=i+i Next Fun arr,n Text1.Text=Str(n) End Sub 程序运行后,单击命令按钮,则在文本框中显示的内容是( )。A.30B.25C.20D.15
在窗体上画一个命令按钮,然后编写如下程序: Option Base 1 Private Sub Command1 Click() Dim Arr1(12)As Integer, Arr2(3)As Integer Dim Sum As Integer Sum = 2 For i=1 To 12 Arrl(i)= i Next i For i=1 To 3 Arr2(i)= Arrl(i*i) Next i For i = 1 To 3 Sum = Sum + Arr2(i) Next i Print Sum End Sub 程序运行后,单击命令按钮,在窗体上的输出结果为A.16B.24C.32D.36
以下有关数组定义的语句序列中,错误的是( )。A.Static arr1(3) arr1(1)=100 arr1(2)="Hello" arr1(3)=123.45B.Dim arr2() AsInteger Dim size As Integer Private Sub Command2_Click () size=InputBox("输入:") ReDim arr2(size) …… EndSubC.Option Base 1 Private Sub Command3 Click() Dim art3(3) As Integer …… End SubD.Dim n As Integer Private Sub Command4 Cliok() Dim arr4(n)As Integer …… End Sub