作业帮 > 数学 > 作业

求结果dim a(6) for i=0 to 6 a(i)=i+1 next for i=0 to 6 count=co

来源:学生作业帮 编辑:神马作文网作业帮 分类:数学作业 时间:2024/10/07 17:35:47
求结果dim a(6) for i=0 to 6 a(i)=i+1 next for i=0 to 6 count=count+a(i)+1 next response.Write count
求结果
dim a(6)
for i=0 to 6
a(i)=i+1
next
for i=0 to 6
count=count+a(i)+1
next
response.Write count
求结果dim a(6) for i=0 to 6 a(i)=i+1 next for i=0 to 6 count=co
i从0到6,七次循环,a0=1,a1=2,a2=3,a3=4,a4=5,a5=6,a6=7.
count相加7次,
count0=0+1+1=2
count1=2+2+1=5
count2=5+3+1=9
count3=9+4+1=14
count4=14+5+1=20
count5=20+6+1=27
count最终结果=27+7+1=35.
这个程序实现的是count=0+2+3+4+5+6+7+8.