以下语句运行的结果是 for i=1 to 6 i=i-1 next print i
举一反三
- 写输出下面程序的运行结果_ _。 Dim a() As Integer Private Sub Command1_Click() ReDim a(1 To 5) For i = 1 To 5 a(i) = i Next i ReDim a(1 To 10) For i = 6 To 10 a(i) = 2 * i Next i For i = 1 To 10 Print a(i); Next i End Sub
- 以下For循环语句运行结束后,循环变量i的值是______ For i=1 to 10 print i, next i
- 以下程序的运行结果是 Sub s1(b() As Integer) For i = 1 To 4 b(i) = 2 * i Next i End Sub Private Sub Command1_Click() Dim a(1 To 4) As Integer For i = 1 To 4 a(i) = i + 5 Next i s1 a() For i = 1 To 4 Print a(i) Next i End Sub
- Dimension a(6) a(1)=1 a(2)=1 FOR i=3 TO 6 a(i)=a(i-1)+a(i-2) NEXT ?a(6)
- 以下程序段中语句 Print i*j 执行的次数是。 For i=1 to 3 For j=5 to 1 step -1 Print i*j Next j,i