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