September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
12
Task/Binary-digits/BASIC/binary-digits-3.basic
Normal file
12
Task/Binary-digits/BASIC/binary-digits-3.basic
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
PRINT FNbinary(5)
|
||||
PRINT FNbinary(50)
|
||||
PRINT FNbinary(9000)
|
||||
END
|
||||
|
||||
DEF FNbinary(N%)
|
||||
LOCAL A$
|
||||
REPEAT
|
||||
A$ = STR$(N% AND 1) + A$
|
||||
N% = N% >>> 1 : REM BBC Basic prior to V5 can use N% = N% DIV 2
|
||||
UNTIL N% = 0
|
||||
=A$
|
||||
Loading…
Add table
Add a link
Reference in a new issue