VB编写程序 计算1~100内3的倍数的数的和

来源:学生作业学帮网 编辑:学帮网 时间:2024/05/17 05:24:38

VB编写程序 计算1~100内3的倍数的数的和

dim x as integer,dim sum as integer
for x=1 to 100
if x mod 3 =0 then
sum=sum+x
end if
next x
print sum