by Szymon Machajewski (1 Submission)
Category: Math/Dates
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 24th February 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
changes decimal values to 36 base (0-9 + A-Z) Six digit number can be expressed in just 4.
'Names: label1, command1, text1
Private Sub Command1_Click()
'get the value of your string entered in
' to the textbox
'left function takes only first 6 digit
' of the number (in case you typed more th
' en 6)
num = Val(Left(Text1, 6))
a = Int(num / 36 ^ 3)
b = Int((num - a * 36 ^ 3) / 36 ^ 2)
c = Int(((num - a * 36 ^ 3) - b * 36 ^ 2) / 36 ^ 1)
d = num - a * 36 ^ 3 - b * 36 ^ 2 - c * 36 ^ 1
'ASCII uses 0-9 then a-z then A-Z, we wa
' nt to skip the lower case font
a = a + 48
If a > 57 Then a = a + 7
b = b + 48
If b > 57 Then b = b + 7
c = c + 48
If c > 57 Then c = c + 7
d = d + 48
If d > 57 Then d = d + 7
Label1.Caption = "36 base: " & Chr(a) & Chr(b) & Chr(c) & Chr(d)
'code by Szymon Machajewski
'Grand Rapids Comm College
'Network Support Tech 1
'[email protected]
End Sub
No comments have been posted about changes decimal values to 36 base (0-9 + A-Z) Six digit number can be expressed in just 4.. Why not be the first to post a comment about changes decimal values to 36 base (0-9 + A-Z) Six digit number can be expressed in just 4..