s=1 for i=1 to 5 step 2 s=s+i endfor s
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/02 17:40:24
![s=1 for i=1 to 5 step 2 s=s+i endfor s](/uploads/image/z/12686880-48-0.jpg?t=s%3D1+for+i%3D1+to+5+step+2+s%3Ds%2Bi+endfor+s)
x)+5TH/R%
%
F
Ŷڙ
y) b"}bِl
m/v?md.C0Xv̧V=[dwӎ
:?[F:O{7g>4i{XoccbTOXAh6Ԩku@kC5Ýqݳ9
O'+*51f`_\g1 CN
s=1 for i=1 to 5 step 2 s=s+i endfor s
s=1 for i=1 to 5 step 2 s=s+i endfor s
s=1 for i=1 to 5 step 2 s=s+i endfor s
s=1 将s赋值为1
for i =1 to 5 step 2 i循环从1到5,每次跳2,即i的值只能是1,3,5,循环3次
s= s + i 循环中,将s+i的值赋值为s
最后s = 1 + 1 + 3 + 5 =10