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 还有这个一起求解释~
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/29 01:26:38
![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 还有这个一起求解释~](/uploads/image/z/9304655-23-5.jpg?t=dim+I%25+%2CS%25+s%3D0+for+I%3D5+to+1+s%3Ds%2Bi+next+I+print+%E2%80%9Cs%3D%E2%80%9D+%3B+s+%E6%80%8E%E4%B9%88%E7%9C%8B%E7%9A%84+dim+I%25+%2CS%25s%3D0for+I%3D1+to+5+step+-1s%3Ds%2Binext+Iprint+%E2%80%9Cs%3D%E2%80%9D%3Bs+%E8%BF%98%E6%9C%89%E8%BF%99%E4%B8%AA%E4%B8%80%E8%B5%B7%E6%B1%82%E8%A7%A3%E9%87%8A%7E)
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 还有这个一起求解释~
dim I% ,S% s=0 for I=5 to 1 s=s+i next I print “s=” ; s 怎么看的
dim I% ,S%
s=0
for I=1 to 5 step -1
s=s+i
next I
print “s=”;s 还有这个一起求解释~
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 还有这个一起求解释~
For...Next 语句
以指定次数来重复执行一组语句.
语法
For counter = start To end [Step step]
[statements]
[Exit For]
[statements]
Next [counter]
说明
step 参数可以是正数或负数.step 参数值决定循环的执行情况,如下所示:
值 循环执行,如果
正数或0 counter = end