Fun Base Converting Program I made
ARubiksCube 15 Oct 2018 02:09
I wrote this program a while ago to convert between two bases:
:Input "BASE IN=", A
:Input "BASE OUT=", B
:Input "INPUT", Str1
:0->C
:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef" -> Str0
:length(Str1) -> D
:" " -> Str2
:For(E, 1, D)
:C + ((inString(Str0, sub(Str1, E, 1)) - 1) * A ^ (D - E)) - C
:End
:1 -> E
:While E = 1
:C / B -> D
:fPart(D)->A
:sub(Str0, round(A * B + 1, 0), 1) + Str2 -> Str2
:D - A -> C
:If C = 0
:0 -> E
:End
:"=" + Str2 -> Str2
:Disp Str2
Not the prettiest, but something I came up with on the fly a while ago.
Just thought some people could use it