单项选择题

下列程序段的执行结果为( )。
Dim A(3,3)
For M=1 To 3
For N=1 To 3
If N=M Or N=3-M+1 Then
A(M, N)=1
Else
A(M,N)=0
End If
Next N
Next M
For M=1 To 3
For N=1 To 3
Print A(M,N)
Next N
Print
Next M

A.1 0 0
0 1 0
0 0 1
B.1 1 1
1 1 1
1 1 1
C.0 0 0
0 0 0
0 0 0
D.1 0 1
0 1 0
1 0 1
<上一题 目录 下一题>
热门 试题

单项选择题
在一个窗体上添加一个命令按钮控件,名为Command1,事件过程如下,则执行结果是( )。 Option Base 1 Private Sub Command1_Cliek() Dim a(5) As Integer Dim k As Integer Dim tota1 As Integer a(1)=2 a(2)=5 a(3)=4 a(4)=10 a(5)=6 Fork=1 To 5 tota1=tota1+a(k) Next k Print total End Sub
A.10
B.15
C.27
D.35
单项选择题
在窗体上放置一个命令按钮Command1,并编写下列单击事件的程序: Option Base 1Private Sub Commandl_Click0Dim C As Integer, d As Integer d=0 c=6 X = Array(2, 4, 6, 8, 10, 12) For i= 1 To 6 If X(i) > c Then d = d + X(i) c = X(i) Else d=d-c End If Next i Print dEnd Sub程序运行后,单击命令按钮,则在窗体上输出的内容为( )。
A.10
B.12
C.16
D.20
相关试题
  • 在窗体上画一个名称为“Command1”、标题...
  • 在窗体上画两个文本框Text1和Text2,一个...