RosettaCodeData/Task/Binary-digits/Phixmonti/binary-digits-1.phixmonti
2023-07-01 13:44:08 -04:00

23 lines
365 B
Text

def printBinary
"The decimal value " print dup print " should produce an output of " print
20 int>bit
len 1 -1 3 tolist
for
get not
if
-1 del
else
exitfor
endif
endfor
len 1 -1 3 tolist
for
get print
endfor
nl
enddef
5 printBinary
50 printBinary
9000 printBinary