下列程序段的执行结果为______。 DimA(10,10) Fori=2 To 4 Forj=4 To 5 A(i,j)-i*j Next j Next i PrintA(2,5)+A(3,4)+A(4,5)
举一反三
- 下列程序段的执行结果为 _______。 Dim a(3, 5) As Integer Dim i As Integer, j As Integer For i = 1 To 3 For j = 1 To 5 a(i, j) = a(i - 1, j - 1) + (i - 1) * 5 + j Next j Next i Print a(3, 4)
- 下列程序段的执行结果为________。 Dim M(10), N(10) i= 4 For j = 1 To 7 M(j) = j N(i) = 2 * i + j Next j Print N(i); M(i)
- 下列程序段的执行结果是______。 i=0 For j = 10 To 19 Step 3 i=i+1 Next j Print I A: 4 B: 5 C: 3 D: 6
- 下列程序段执行时在屏幕上显示的结果是( )。 DIME A(3,2) FORI=1 TO 3 FOR J=1 TO 2 A(I,J)=I+J NEXT NEXT A(5) A: 3 B: 4 C: 5 D: 6
- 在窗体上画一个名为Command1的命令按钮,然后编写如下代码: Option Base 1 Private Sub Command1_ Click() Dim arr(4, 4) For i = 1 To 4 For j = 1 To 4 arr(i, j) = (i - 1) * 3 + j Next j Next i For i = 1 To 2 For j = 1 To 2 Print arr(i, j) Next j Next i End Sub程序运行后,单击命令按钮,输出结果为______ 。 A: 3 4 6 7 B: 7 8 10 11 C: 1 2 4 5 D: 8 9 12 13