什么宽带最好用最便宜:ASP初学者

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/10 12:50:27
<%
dim a(4)
a(0)=95
a(1)=85
a(2)=90
a(3)=92
a(4)=79
for i=0 to 4
response.write("第"&(i+1) &"个学生的成绩是"&a(i)&"<br>")
b=b+a(i)
next
response.write("平均成绩是"&b/5)
%
这里面的b=b+a(i)是什么意思啊
请解释一下

就是把成绩加起来
<%
dim a(4)
a(0)=95
a(1)=85
a(2)=90
a(3)=92
a(4)=79
b=0
for i=0 to 4
response.write("第"&(i+1) &"个学生的成绩是"&a(i)&"<br>")
b=b+a(i)
next
response.write("平均成绩是"&b/5)
%>
如果不写b=0可能回出错

用B变量把上面所有成绩加起来然后下面 b/5 求平均分!