下列程序段中,循环体s = s +1执行了几次?For i = 0 To 7 Step 3 For j = 0 To 7 Step 2 s = s + 1 NextNext
A: 5
B: 7
C: 12
D: 49
A: 5
B: 7
C: 12
D: 49
举一反三
- 下列程序段中,循环体s = s +1执行了几次? For i = 0 To 7 Step 3 For j = 0 To 7 Step 2 s = s + 1 Next Next
- 下列程序中 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 20 Step 2 s = s + i Next i
- 以下程序段实现的输出是()。for(i=0;i<;=9;i++)s[i]=i;for(i=9;i>;=0;i--)printf("%2d",s[i]);[/i][/i] A: 9 7 5 3 1 B: 1 3 5 7 9 C: 9 8 7 6 5 4 3 2 1 0 D: 0 1 2 3 4 5 6 7 8 9
- 下列程序执行后,sum的结果是________。Dim sum As IntegerFor i = 1 To 4 Step 2 For j = 1 To i Step 2 sum += j NextNext A: 6 B: 9 C: 5 D: 7