执行下列程序段后,输出结果是
n = 0
For i=1 To 3
For j=5 To 1 Step -1
n = n + 1
Next j, i
Debug.Print n; j; i
n = 0
For i=1 To 3
For j=5 To 1 Step -1
n = n + 1
Next j, i
Debug.Print n; j; i
举一反三
- 下列程序段的执行结果为_______。 M=0 For I=1 To 3 For J =5 To 1 Step-1 N = N+1 Next J,I Print N;J;I
- 下面____程序段不能正确显示1!、2!、3!、4!的值。 A: For I=1 To 4 n=1 For j=1 to I n=n*j Next j Print n Next I B: For I=1 To 4 For j=1 to I n=1 n=n*j Next j Print n Next I C: n=1 For j=1 to 4 n=n*j Print n Next j D: n=1:j=1 Do While j<=4 n=n*j Print n j=j+1Loop
- 下列程序段的执行结果为( )。 n:0 For i=1 To 3 For j=5 To Step-1 n=n+1 Next j,i Print n:j;i A: A) 12 0 4 B: B) 15 0 4 C: C) 12 3 1 D: D) 15 3 1
- 下列程序段的执行结果为 。n = 0For i = 1 To 3 For j = 5 To 1 Step -1 n = n + 1Next j, iPrint n; j; i A: 12 0 4 B: 15 0 4 C: 12 3 1 D: 15 3 1
- 下列程序段能且只能显示1!、2!、3!、4!的值的是( )。 A: For i = 1 To 4 n = 1 For j = 1 To i n = n * j Next j MsgBox(n)Next i B: For i = 1 To 4 For j = 1 To i n = 1 n = n * j Next j MsgBox(n)Next i C: n = 1For i = 1 To 4 For j = 1 To 4 n = n * j MsgBox(n) Next jNext i D: n = 1j = 1Do While j <= 4 n = n * j j = j + 1LoopMsgBox(n)