如何用VB计算1+2+3+4+……+1000?

问题描述:

如何用VB计算1+2+3+4+……+1000?

dim s as long,i as long
s=0
for i=1 to 1000
s=s+i
next i
print s