vbscript简单问题 不懂为啥输出时是35 加分

来源:百度知道 编辑:UC知道 时间:2024/05/28 00:52:39
<%
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

%>
答案为啥是35呢

看注释
<%
dim a(6)
for i=0 to 6
a(i)=i+1'//////a(0)=1,a(1)=2……a(6)=7
next
for i=0 to 6
count=count+a(i)+1'//////7次循环count的值分别为:2,5,9,14,20,27,35
next
response.write count

%>
答案为啥是35呢