关于VBScript的、高手进来

来源:百度知道 编辑:UC知道 时间:2024/05/09 19:18:33
老师叫我们用多种方法、编个1-2+3-4+5-6+7-8+9……99要怎么编、还有1*2*3*4*5*6……100

第一个:
<html xmlns="http://www.w3.org/1999/xhtml" ><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>

<%@Language="VBScript">
<%dim a,b,c,d
for a=1 to 99 step 2
b=b+a
next
for a=2 to 100 step 2
c=c+a
next
d=b-c
response.write d
%>
</head>
<body>
</body>
</html>

第二个:
<html xmlns="http://www.w3.org/1999/xhtml" ><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>

<%@Language="VBScript">
<%dim a,b
for a=1 to 100
b=b*a
next
resp