Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
16
Task/Count-in-octal/MiniScript/count-in-octal.mini
Normal file
16
Task/Count-in-octal/MiniScript/count-in-octal.mini
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue