下列For循环语句中,使用错误的是_______。
A: For i = 2 to 10 ```Next
B: For i = 2,4,6,8,10 ```Next
C: For i = 10 to 2 Step -2 ```Next
D: For i = 2 to 10 Step 2 ```Next
A: For i = 2 to 10 ```Next
B: For i = 2,4,6,8,10 ```Next
C: For i = 10 to 2 Step -2 ```Next
D: For i = 2 to 10 Step 2 ```Next
举一反三
- 已知程序段: s=0 For i=1 to 10 step 2 s=s+1 i=i*2 Next i 该程序段的循环次数是( )。
- 下列循环嵌套的结构中,正确的是_______。 A: For i = 2,4,6,8,10 ``` Do ``` Loop While s > 0Next B: For i = 2 To 10 ``` Do While s > 0 ``` LoopNext C: For i = 2 To 10 ``` Do While s > 0 ``` Next Loop D: For i = 2 To 10 ``` Do ``` Next Loop While s > 0
- 下列程序中 s = s + j 语句共执行了______次。 Dim s As Integer Dim i As Integer, j As Integer For i = 1 To 10 Step 2 For j = 1 To 5 Step 2 s = s + j Next j Next i Print s
- 存在程序段: s=0 For i=1 to 10 step 2 s= s + 1 i= i * 2 Next i 当循环结束后,变量i ,s 的值分别为().
- 下列循环嵌套的结构中,正确的是_______。 A: For i = 2,4,6,8,10 ``` Do ``` Loop While s > 0Next B: For i = 2 To 10 ``` Do While s > 0 ``` LoopNext C: For i = 2 To 10 ``` Do While s > 0 ``` Next Loop D: For i = 2 To 10 ``` Do ``` Next Loop While s > 0