作业帮 > 综合 > 作业

vb输入1个整数 判断能否被3和7整除,若能输出A 不能输出B

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/06 12:34:05
vb输入1个整数 判断能否被3和7整除,若能输出A 不能输出B
我需要正确的代码.
pravite sub command1_Click()
dim n%
n=inputbox("请输入一个整数","输入整数")
if n mod 3=0 and n mod 7=0 then
print "A"
else
print "B"
end if
end su