VB程式求1-40之間能被5整除得所有數的和.

VB程式求1-40之間能被5整除得所有數的和.

dim sum%,i%
for i=1 to 40
if i mod 5=0 then sum=sum+i
next
print sum