[单选题]

下列程序段的执行结果为______。 Dim m(3,3)As Integer Dim i As Integer Dim j As Integer Dim x As Integer For i=1 To 3 m(i,i)=i Next For i=0 T0 3 For j=0 To 3 x=x+m(i, j) Next Next Print x

A.3

B.4

C.5

D.6

参考答案与解析:

相关试题

下列程序段的执行结果为______。Dim m(3,3)As IntegerDi

[单选题]下列程序段的执行结果为______。 Dim m(3,3)As Integer Dim i As Integer Dim j As Integer Dim x As Integer For i=1 To 3 m(i,i)=i Next For i=0 To 3 For j=0 To 3 x=x+m(i,j) Next Next Print xA.3B.4C.5D.6

  • 查看答案
  • 下列程序段的执行结果为 ______。Dim m(3,3)As IntegerD

    [单选题]下列程序段的执行结果为 ______。 Dim m(3,3)As Integer Dim i As Integer Dim j As Integer Dim K As Integer For i=1 To 3 m(i,i)=i Next For i=0 To 3 For j=0 To 3 x=x+m(i,j) Next Next Print xA.3B.4C.5D.6

  • 查看答案
  • 下列程序段的执行结果为 ______。Dim m(3,3)As IntegerD

    [单选题]下列程序段的执行结果为 ______。 Dim m(3,3)As Integer Dim i As Integer Dim j As Integer Dim x As Integer For i=1 To 3 m(i,i)=i Next For i=0 To 3 For j=0 To 3 x=x+m(i,j) Next Next Print xA.3B.4C.5D.6

  • 查看答案
  • 下列程序段的执行结果为 Dim A(3,3) For M=1 To 3 For

    [单选题]下列程序段的执行结果为D.im A(3,3)F.or M=1 To 3F.or N =1 To 3If N=M Or N=3-M+1 ThenA.(M,N)=1E.lseA.(M,N)=0E.nd IfNext NNext MF.or M=1 To 3F.or 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 3

    [单选题]下列程序段的执行结果为______。 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

  • 查看答案
  • 下列程序段的执行结果为()。Dim A(3,3)For M=1 To 3 For

    [单选题]下列程序段的执行结果为( )。 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

  • 查看答案
  • 下列程序段的执行结果为()。Dim A(3,3)For M=1 To 3For

    [单选题]下列程序段的执行结果为( )。 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

  • 查看答案
  • 下列程序段的执行结果为Dim A(3,3)For M=1 To 3 For N=

    [单选题]下列程序段的执行结果为 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 3For N=1

    [单选题]下列程序段的执行结果为D.im A(3,3)F.or M=1 To 3F.or N=1 To 3If N=M Or N=3-M+1 ThenA.(M,N) =1E.lseA.(M,N) =0E.nd IfNext NNext MF.or M=1 To 3F.or 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

    [单选题]下列程序段的执行结果是( )。D.im A(3,3)F.or M=1 To 3F.or N=1 To 3If N=M Or N=3-M+1 ThenA.(M,N)=1E.lseA.(N,N)=0E.nd IfNext NNext MF.or M=1 To 3F.or 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 m(3,3)As IntegerDi