Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
|||
function num_base$(number, base)
|
||||
if base > 9 then
|
||||
print "base not handled by function"
|
||||
pause 5
|
||||
return ""
|
||||
end if
|
||||
|
||||
ans$ = ""
|
||||
|
||||
while number <> 0
|
||||
n = (number mod base)
|
||||
ans$ = string(n) + ans$
|
||||
number = number \ base
|
||||
end while
|
||||
|
||||
if ans$ = "" then ans$ = "0"
|
||||
|
||||
return "." + ans$
|
||||
end function
|
||||
|
||||
for k = 2 to 5
|
||||
print "Base = "; k
|
||||
for l = 0 to 12
|
||||
print ljust(num_base$(l, k), 6);
|
||||
next l
|
||||
print : print
|
||||
next k
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue