下列程序段的执行结果为 Dim A(10,10) For 1=2 To 4 For J=4 To 5 A(I,J)=I*J Next J Next I Print A(2,5)+A(3,4)+A(4,5)A.22B.42C.32D.52
下列程序段的执行结果为 Dim A(10,10) For 1=2 To 4 For J=4 To 5 A(I,J)=I*J Next J Next I Print A(2,5)+A(3,4)+A(4,5)
A.22
B.42
C.32
D.52
相关考题:
阅读下列的程序段:sum=0for i=1 to 3for i=i to 4for k=j to 5sum=sum+1next knext jnext I执行上面的三重循环后,sum的值为______。
有以下程序: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
假设有下列程序段:For i=1 To 3For j=5 To 1 Step-1Print i*iNext jNext i则语句Print i*j的执行次数是______,i的值为______,j的值为______。
有如下程序,该程序的执行结果是【 】。Private Sub Command1_lick()For i= 1 To 4x= 4For j =1 To 3x =3For k=1 To 2X= K+5Next kNext jNext iPrint xEnd Sub
( 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
下列程序段的执行的结果是Dim a(10) , b(10)i=3For j=1 To 5a(j) =jb(i) =2i + jNext jPrint b(i) ; a(i)( )。A.113B.315C.311D.153
在窗体上画一个名称为Label1的标签,然后编写如下事件过程:Private Sub Form_Click()Dim arr(10, 10) As IntegerDim i As Integer, j As IntegerFor i = 2 To 4For j = 2 To 4arr(i, j) = i * jNext jNext iLabel1.Caption = Str(arr(2, 2) + arr(3, 3))End Sub程序运行后,单击窗体,在标签中显示的内容是( )。A.12B.13C.14D.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(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
假定有以下程序段For i=1 To 3For j=5 To 1 step -1Print i*jNext jNext i则语句 Print i*j 的执行次数是A ) 15B ) 16C ) 17D ) 18
执行下列程序段后输出的结果是( )。s = 1For i = 1 To 3For j = 0 To i-1s = s + s * jNext j? s;Next IA、 1 2B、 2 1C、 2 2 12D、 1 2 12
请阅读程序:Option Base 1Pfivate Sub Form_Click()Dim Arr(4,4)As IntegerFor i=1 To 4For j=1 To 4Arr(i,j)=(i-1)*2+jNext jNext iFor i=3 To 4For j=3 To 4Print Arr(j,i);Next jPrintNext iEnd Sub程序运行后,单击窗体,则输出结果是( )。A.5 7 6 8B.6 8 7 9C.7 9 8 10D.8 10 8 11
在窗体上画一个命令按钮,其名称为Command1,然后编写如下事件过程:Private Sub Command1_Click()Dim a1(4, 4), a2(4, 4)For i = 1 To 4For j = 1 To 4a1(i, j) = i + ja2(i, j) = a1(i, j) + i + jNext jNext iPrint a1(3, 3); a2(3, 3)End Sub程序运行后,单击命令按钮,在窗体上输出的是( )。A.6 6B.10 5C.7 21D.6 12
以下程序的功能是将多维数组a(1 To m,1 To n)中的元素转移到一个名为b(1 To n*m)的一维数组中,完成该程序。OptionBase 1Private Sub Command1_Click(Index As Integer)Dima(1 To 20,1 To 10)Dim b()ReDimb(1 To 200)For i=1 To 20For j=1 To 10A(i,j)=i*jNext jNext iTran a,20,10bEnd SubSub Tran(a()an,n,b())Dim i As IntegerFor i=1 To mFor j=1 To n______=a(i,j)Next jNext iEnd Sub
阅读下面的程序段:sum=0for i=1 to 3for j=i to 4for k=j to 5sum=sum+1next knext jnext i执行上面的三重循环后,sam的值为______。
假定有以下程序段For i=1 To 3 For j=5 To 1 Srep-1 Print i*j Next jNext i则语句Print i*j 的执行次数是______。A.15B.16C.17D.18
有如下程序,该程序的执行结果是【 】。Private Sub Command1 Click()For i=1 To 4x=4For j=1 To ix =3For k=1 To 2x= x + 5Next kNext jNext iPrint xEnd Sub
下列程序段执行后,执行的结果是______ 。 Dim M(10) Dim N(10) i=3 For j = 1 To 5 M(j) = j N(i) = 2 * i + j Next j Print N(i); M(i)A.12 4B.11 3C.3 11D.10 2
下列程序段的输出结果是( )。Dim M(5,5),S(5)For i=1 To 5S(i)=0For j=1 To 5M(i,j)=i+jS(i)=S(i)+M(i,j)Next jNext iFor Each x In SPrint x;Next xA.20 23 24 35 40B.20 25 30 35 40C.20 23 25 35 40D.20 25 35 40 45
下列程序段的执行结果为______ 。 Dim A(10,10) For I = 2 To 4 For J = 4 To 5 A(I, J) = I * J Next J Next I Print A(2, 5) + A(3, 4) + A(4, 5)A.22B.42C.32D.52
假定有下列程序段For i=1 TO 3For j=5 TO 1 Step-1Print i*jNext jNext i则语句Print i*j的执行次数是( )。A.15B.16C.17D.18
下列程序段的执行结果为______。N=0For I=1 To 3 For J=5 To 1 Step-1 N=N+1 Next JNext IPrint N;J;IA.12 0 4B.15 0 4C.12 3 1D.15 3 1
下列程序段的执行结果为 Dim A(10, 10) For I=2 To 4 For J=4 To 5 A(I,J)=I*J Next J Next I Print A(2, 5)+ A(3, 4) + A(4, 5)A.22B.42C.32D.52
下列程序段的执行结果为【 】。Dim A (10,10)For i = 2 To 4For j =4 To 5A(i,j) =i*jNextNextPrint A (2,5) +A(3,4) +A(4,5)