请VB高手来帮帮忙啊~~很急啊~~

2024-12-21 21:24:21
推荐回答(2个)
回答1:

private sub form_click()
dim b as string,d as long
d=val(inputbox("请输入一个十进制数","输入"))
do while d>0
b=d mod 2 & b
d = d \ 2
loop
print b
end sub

回答2:

两个地方需要改

1、
dim b as long,d as boolen
改成这个
dim b as String,d as long

2、
b=b&d/2
改成这个
b = d Mod 2 & b