判断一个数是否满足以下条件? 要求用VB写
来源:百度知道 编辑:UC知道 时间:2024/06/19 07:10:57
条件1.能被3整除,且为5的倍数
2.该数为偶数
要求写出全过程
2.该数为偶数
要求写出全过程
if n mod 3=0 and n mod 2=0 and n mod 5=0 then....
n代表这个数
if not x mod(3*5*2) then
x为方程的解!
这个超简单:private sub command1_click()if int(val(text1.text)/3)<>0 and (right(text1.text,1,1)="0" or right(text1.text,1,1)="5") thenmsgbox "这个数满足条件"end ifend sub