Private Sub Command1_Click()
Me.Font.Size = 25
Print erjinzhi(150)
End Sub
Private Function erjinzhi(m As Byte) As String
Dim n As Byte
n = m
Const er As Byte = 2
Dim shang As Byte
Dim yushu(1 To 8) As Byte
Dim i As Byte
Dim returnS As String
i = UBound(yushu)
shang = n \ er
yushu(i) = n Mod er
returnS = yushu(i)
While shang <> 0
i = i - 1
n = shang
shang = n \ er
yushu(i) = n Mod er
returnS = yushu(i) & returnS
Wend
Print returnS
End Function
Me.Font.Size = 25
Print erjinzhi(150)
End Sub
Private Function erjinzhi(m As Byte) As String
Dim n As Byte
n = m
Const er As Byte = 2
Dim shang As Byte
Dim yushu(1 To 8) As Byte
Dim i As Byte
Dim returnS As String
i = UBound(yushu)
shang = n \ er
yushu(i) = n Mod er
returnS = yushu(i)
While shang <> 0
i = i - 1
n = shang
shang = n \ er
yushu(i) = n Mod er
returnS = yushu(i) & returnS
Wend
Print returnS
End Function