有如下Visual Basic程序段:s = 0 For i = 1 To 5 s = s + i Next i 该程序
1个回答
i为5的时候还是要执行循环体,当循环体执行完之后还要执行一次Next i所以i就为6了
这时退出循环
相关问题
14.有如下的Visual Basic程序段:s = 1 For i = 10 To Step -1 s = s * i
下列Visual Basic程序段运行后,变量s的值为__. a=2:b=1:s=0 For i=10 To 6 Ste
已知程序段:s=0 For i =1 to 10 step 2 s = s+1 i = i * 2 Next i 当循环
for next 循环s=0for i=1 to 10 step 2s=s+1i=I*2next i当循环变量后,i,s
s=0 For i=1 to 10 step 2 s=s+i Next Print s
Dim a(4) s=0 For i=1 to 4 s=s+a(i) Next i
vb题 s=0:n=5 for i=1 to n s=s+i next i print s;i 结果怎么是15
i=1,S=0,WHILE i≤50,S=S+i,i=i+1,WEND PRINT S END.程序执行后输出的结果S=
s=0:t=o:u=0for i=1 to 3for j=1 to i for k=j to 3s=s+1next kt
For i = 2.6 To 4.9 Step 0.6 s = s + 1 Next i