发布网友
共1个回答
热心网友
'加两个按钮,一个文本框,拷进去即可运行
Private Sub Command1_Click()
Cls
num = Text1
For i = 1 To 16
j = num Mod 2
s = j & s
num = num \ 2
If i Mod 4 = 0 Then Print s: s = ""
Next
Print
End Sub
Private Sub Command2_Click()
num = Text1
For i = 1 To 16
If i = 4 Or i = 7 Or i = 10 Or i = 13 Then
j = 0
Else
j = num Mod 2
End If
s = j & s
num = num \ 2
If i Mod 4 = 0 Then Print s: s = ""
Next
Print
End Sub