for i=1 to30 if int(i/5)=i/5 then s=s+i i=i+6 next i 求s

来源:学生作业帮助网 编辑:六六作业网 时间:2024/05/14 08:29:02
fori=1to30ifint(i/5)=i/5thens=s+ii=i+6nexti求sfori=1to30ifint(i/5)=i/5thens=s+ii=i+6nexti求sfori=1to30

for i=1 to30 if int(i/5)=i/5 then s=s+i i=i+6 next i 求s
for i=1 to30 if int(i/5)=i/5 then s=s+i i=i+6 next i 求s

for i=1 to30 if int(i/5)=i/5 then s=s+i i=i+6 next i 求s
45
当i为5时,int(i/5)=i/5成立.s变为5,i变为11.之后,i为15和25时,条件成立.所以
s=5+15+25=45