假定有以下程序段n=0for i=1 to 6 step 2 for j=4 to 1 step -1 n=n+1 next jnext i运行完毕后,n的值是______。
A: 0
B: 3
C: 4
D: 12
A: 0
B: 3
C: 4
D: 12
举一反三
- 假定有以下程序段: n=0 for i=1 to 4 for j=3 to -1 step -1 n=n+l next j next i运行完毕后n的值是( )。 A: 12 B: 15 C: 16 D: 20
- 假定有以下程序段 n = 0 For i = 1 To 3 For j = -4 To -1 n = n + 1 Next j Next i 运行完毕后,n的值是
- 下列程序段的执行结果为 。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
- 执行下列程序段后,输出结果是 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
- 下列程序段能分别正确显示1!、2!、3!、4!的值的是______。 A: For i = 1 To 4 n = 1 For j = 1 To i n = n * j MsgBox(n) Next jNext 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 MsgBox(n) j = j + 1Loop