看下面一段ASP 语句哪里错误
来源:百度知道 编辑:UC知道 时间:2024/05/22 00:13:10
<%
dim sum
sum=0
for a=1 to 100
if a mod 2=0 then
sum=sum+a
next
%>
<%
=sum
%>
dim sum
sum=0
for a=1 to 100
if a mod 2=0 then
sum=sum+a
next
%>
<%
=sum
%>
少了个end if!
<%
dim sum
sum=0
for a=1 to 100
if a mod 2=0 then
sum=sum+a
end if
next
%>
<%
=sum
%>
少了个"end if"
程序修正如下:
<%
dim sum
sum=0
for a=1 to 100
if a mod 2=0 then
sum=sum+a
end if
next
%>
<%=sum%>
<%
dim sum
sum=0
for a=1 to 100
if a mod 2=0 then
sum=sum+a
end if
response.write(sum)
next
%>
看错了.