下列程序段的执行结果为 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 MA.1 0 0 0 1 0 0 0 0B.1 1 1 1 1 1 1 1 1C.0 0 0 0 0 0 0 0 0D.1 0 1 0 1 0 1 0 1
下列程序段的执行结果为 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 0
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
相关考题:
下列程序段的执行结果是Dim A(3,3)For M = 1 To 3For N = 1 To 3If N = M Or N = 3 - M + 1 ThenA(M,N) = 1Else A(M,N) = 0 End IfNext NNext MFor M = 1 To 3For N = 1 To 3Print A(M,N)Next NPrint Next MA. 1 0 0 0 1 0 0 0 1 B. 1 1 1 1 1 1 1 1 1C. 0 0 0 0 0 0 0 0 0 D. 1 0 1 0 1 0 1 0 1
下列程序段的执行结果为( )。 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 MA.1 0 0 0 1 0 0 0 1B.1 1 1 1 1 1 1 1 1C.0 0 0 0 0 0 0 0 0D.1 0 1 0 1 0 1 0 1
下列程序段的执行结果为Dim A(3,3)For M=1 To 3For N=1 To 3If N=M Or N=3-M+1 ThenA(M,N) =1ElseA(M,N) =0End IfNext NNext MFor M=1 To 3For N=1 To 3Print A(M,N)Next NPrintNext MA.1 0 0 0 1 0 0 0 0B.1 1 1 1 1 1 1 1 1C.0 0 0 0 0 0 0 0 0D. 1 0 1 0 1 0 1 0 1
下列程序段的执行结果是( )。Dim A(3,3)For M=1 To 3For N=1 To 3If N=M Or N=3-M+1 ThenA(M,N)=1ElseA(N,N)=0End IfNext NNext MFor M=1 To 3For N=1 To 3Print A(M,N)Next NPrintNext MA.1 0 0 0 1 0 0 0 1B.1 1 1 1 1 1 1 1 1C.0 0 0 0 0 0 0 0 0D.1 0 1 0 1 0 1 0 1
以下程序段的执行结果是 ______。 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) =m + n 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 mA. 1 1 1 1 1 1 1 1 1B.2 0 4 0 4 0 4 0 6C.0 0 0 0 0 0 0 0 0D.1 0 1 0 1 0 1 0 1
下列程序段的执行结果为______。 Dim A(3,3) For M=1 To 3 For N=1 To 3 If N=M 0r 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 MA.1 0 0 0 1 a 0 0 1B.1 1 1 1 1 1 1 1 1C.0 0 0 0 0 0 0 0 0D.1 0 1 0 1 0 1 0 1
下列程序段的执行结果为( )。 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 MA.1 0 0 0 1 0 0 0 1B.1 1 1 1 1 1 1 1 1C.0 0 0 0 0 0 0 0 0D.1 0 1 0 1 0 1 0 1
执行下面程序段后,变量k的值为()。 k=0; for(m=1;m<4;m++) { for(n=1;n<5;n++) { if(m*n%3==0) continue; k++; } }A.3B.1C.6D.12