题目内容

在窗体上添加一个命令按钮,然后编写以下程序: Option Base 1 Private Sub Command1_Click() Dim a(9)As Integer,b(3,3)As Integer For i = 1 To 9 a(i)= i Next i For i = 1 To 3 For j = 1 To 3 b(i,j)= a(j +(i - 1)* 3) Next j Next i For i = 1 To 3 Step 2 For j = 1 To 3 Print b(i,j); Next j Print Next i End Sub 运行程序后,单击命令按钮,输出结果是________。

A. 4 5 6 7 8 9
B. 1 4 7 3 6 9
C. 1 2 3 7 8 9
D. 1 2 3 4 5 6

查看答案
更多问题

以下程序输出的结果是________。 Option Base 1 Private Sub Command1_Click() Dim a,b(3,3) a = Array(1,2,3,4,5,6,7,8,9) For i = 1 To 3 For j = 1 To 3 b(i,j)= a(i * j) If (j >= i)Then Print Tab(j * 3);Format(b(i,j),"###"); Next j Print Next i End Sub

A. 1 4 5 7 8 9
B. 1 2 3 4 6 9
C. 1 4 7 2 4 6 3 6 9
D. 1 2 3 4 5 6 7 8 9

下列语句组,正确的是________。

A. Dim a() As Integer ReDim a(m + 10)
B. m = 10 Dim a(m)As Integer ReDim a(m + 10)
C. Dim a() ReDim a(m + 10)As Integer
Dim a()As Integer ReDim a(2,3) ReDim Preserve a(3,3)

默认情况下,下面声明的数组的元素个数是________。 Dim a(3,-2 To 2)

A. 15
B. 16
C. 20
D. 12

如下数组声明语句中,________是正确的。

A. Dim a[3,4] As Integer
B. Dim a(n,n)As Integer
C. Dim a(3 4)As Integer
Dim a(3,4)As Integer

答案查题题库