Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Binary-digits/FBSL/binary-digits.fbsl
Normal file
12
Task/Binary-digits/FBSL/binary-digits.fbsl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#AppType Console
|
||||
function Bin(byval n as integer, byval s as string = "") as string
|
||||
if n > 0 then return Bin(n \ 2, (n mod 2) & s)
|
||||
if s = "" then return "0"
|
||||
return s
|
||||
end function
|
||||
|
||||
print Bin(5)
|
||||
print Bin(50)
|
||||
print Bin(9000)
|
||||
|
||||
pause
|
||||
Loading…
Add table
Add a link
Reference in a new issue