Anonymous user
Count in octal: Difference between revisions
→0815: Fix to conform to task specification.
No edit summary |
(→0815: Fix to conform to task specification.) |
||
Line 6:
=={{header|0815}}==
<lang 0815>}:l:> Start loop, enqueue Z (initially 0).
}:o: Treat the queue as a stack and
<:8:= accumulate the octal digits
/=>&~ of the current number.
</lang>▼
<:0:- Get a sentinel negative 1.
&>@ Enqueue it between the digits and the current number.
{ Dequeue the first octal digit.
}:p:
~%={+ Rotate each octal digit into place and print it.
^:p:
<:a:~$ Output a newline.
<:1:x{+ Dequeue the current number and increment it.
▲^:l:</lang>
=={{header|Ada}}==
|