RosettaCodeData/Task/Count-in-octal/MiniScript/count-in-octal.mini
2023-12-16 21:33:55 -08:00

16 lines
242 B
Text

toOctal = function(n)
result = ""
while n != 0
octet = n % 8
n = floor(n / 8)
result = octet + result
end while
return result
end function
maxnum = 10 ^ 15 - 1
i = 0
while i < maxnum
i += 1
print i + " = " + toOctal(i)
end while