大家帮帮我,为什么这段vbscript不能实现2+4+6一直到加98的和呢??

来源:百度知道 编辑:UC知道 时间:2024/05/30 18:40:09
<html>
<head>
<title>123</title>
<script language=vbs>
dim a,b,c
a=2
do while a<=98
b=a+2
c=a+b
a=a+2
loop
msgbox "2+4+6+8+.....+98=" & c

</script>
</head>
<body>
</body>
</html>

<html>
<head>
<title>123</title>
<script language=vbs>
dim a,b,c
a=0
c=0
do while a<=98
a=a+2
c=a+c
loop
msgbox "2+4+6+8+.....+98=" & c

</script>
</head>
<body>
</body>
</html>

<html>
<head>
<title>123</title>

</head>
<body>
<script language="vbscript">
dim a,b,c
a=0
c=0
do while a<=98
a=a+2
c=a+c
loop
msgbox "2+4+6+8+.....+98=" & c

</script>
</body>
</html>

应该没问题