作业帮 > 综合 > 作业

VB试题:编写函数fun,函数的功能是:求I 到a之间的偶数之积

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/12 17:20:21
VB试题:编写函数fun,函数的功能是:求I 到a之间的偶数之积
Private Sub fun()
if i mod 2 = 0 then
for x=i to a step 2
s=s*x
next x
else
for x=(i+1) to a step 2 then
s=s*x
next x
end if
试试看行不行吧