for i=1 to 5 step 2 i=i+1 next i print i 这个答案是什怎么算

来源:学生作业帮助网 编辑:六六作业网 时间:2024/07/08 08:17:03
fori=1to5step2i=i+1nextiprinti这个答案是什怎么算fori=1to5step2i=i+1nextiprinti这个答案是什怎么算fori=1to5step2i=i+1nex

for i=1 to 5 step 2 i=i+1 next i print i 这个答案是什怎么算
for i=1 to 5 step 2 i=i+1 next i print i 这个答案是什怎么算

for i=1 to 5 step 2 i=i+1 next i print i 这个答案是什怎么算
第一次i=1,i+1得2
next i使i=4(因为step 2)
循环体内i+1得5.然后next i使i=7,结束循环,打印 7