RosettaCodeData/Task/Count-in-octal/Run-BASIC/count-in-octal.run
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

15 lines
285 B
Text

input "Begin number:";b
input " End number:";e
for i = b to e
print i;" ";toBase$(8,i)
next i
end
function toBase$(base,base10)
for i = 10 to 1 step -1
toBase$ = str$(base10 mod base) +toBase$
base10 = int(base10 / base)
if base10 < 1 then exit for
next i
end function