For i = 2.6 To 4.9 Step 0.6 s = s + 1 Next ivb for循环中计算s 的值

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 23:13:04
Fori=2.6To4.9Step0.6s=s+1Nextivbfor循环中计算s的值Fori=2.6To4.9Step0.6s=s+1Nextivbfor循环中计算s的值Fori=2.6To4.9S

For i = 2.6 To 4.9 Step 0.6 s = s + 1 Next ivb for循环中计算s 的值
For i = 2.6 To 4.9 Step 0.6 s = s + 1 Next i
vb for循环中计算s 的值

For i = 2.6 To 4.9 Step 0.6 s = s + 1 Next ivb for循环中计算s 的值
若S初值为0,此循环总共被执行3次,执行结束后,S=3!
在 for i= 2.6 to 4.9 step 0.6 里面,初值是2.6,2.6开始循环,到4.9终止,每一步的步长是0.6.所以:
第一次,i= 2.6 S=0+1 S=1
第二次,i= 3.2 S=1+1 S=2
第三次,i= 4.4 S=2+1 S=3
第四次,i= 5.0 循环体不执行,转向Next跳出.

s=5 for i 2.6 to 4.9 step 0.6 s=s+1 next i 是怎样解的啊s=5for i 2.6 to 4.9 step 0.6 s=s+1 next i For i = 2.6 To 4.9 Step 0.6 s = s + 1 Next ivb for循环中计算s 的值 VB执行下列程序:S=5 For I = 2.6 to 4.9 step 0.6 S = S + 1 Next i Print S 求程序运行后的结果! s=1 for i=1 to 100 s=s*i endfor s 中的s=1 和s=s*i Dim a(4) s=0 For i=1 to 4 s=s+a(i) Next i s=1 for i=1 to 5 step 2 s=s+i endfor s s = 2 For i = 3.2 To 4.9 Step 0.8 s = s + 1 next i求运行结果为什么 麻烦解释下咯 free pascal中for语句的具体意思.比如 for i=1 to 100 do s=s+free pascal中for语句的具体意思.比如for i=1 to 100 do s=s+i dim I% ,S% s=0 for I=5 to 1 s=s+i next I print “s=” ; s 怎么看的 dim I% ,S%s=0for I=1 to 5 step -1s=s+inext Iprint “s=”;s 还有这个一起求解释~ s=20 For i=1 to 5 setp2 S=S-i Next i print S 到底怎么个算法? for next 循环s=0for i=1 to 10 step 2s=s+1i=I*2next i当循环变量后,i,s的值各为() vfp程序解答,set talk off,s=0,for i=1 to 10,i=i+1,s=s+i,endfor,?s,i 输出结果s=30,i=11,怎么回事? var a,i,s:longint; begin readln(a); s:=0; for i:=1 to a do s:=s+i; writeln(s); end.vara,i,s:longint;beginreadln(a);s:=0;for i:=1 to a dos:=s+i;writeln(s);end. s=0,for i=1 to 5,for j=1 to i,for k=j to 4,s=s+1,next k,next j,next i,msgbox s,求详解s= 0For i = 1 To 5For j = 1 To iFor k = j To 4 s = s + 1Next k Next j Next iMsgBox sA.4 B.5 C.38 D.40自己算的和四个选项都不一样. VB编程 s=5 for i=1 to 23step6 s=s+1 next i 执行程序,为啥i的值为25? 有一道信息技术题S=0For i=1 To 3S=S+1Next i求变量S值 写出运行结果:s=o FOR I=2 TO 200 STEP 2 S=S+I I=,I IF S>10 EXIT ENDIF ENDFOR S=,S i want to go s( ) realxing for vacation