16 lines
242 B
Text
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
|