Skip to main content
edited body
Source Link
Giuseppe
  • 28.8k
  • 3
  • 31
  • 105

Cubix, 17 bytes

....1I>sO)su.@?(O

Try it online!

cubified:

    . .
    . .
1 I > s O ) s u
. @ ? ( O . . .
    . .
    . .

Pushes 1, reads in the input (I), then enters the loop which swaps the top of the stack, outputs it, decrementsincrements, swaps, outputs the top of the stack, decrements, and stops if the top of the stack is 0.

Cubix, 17 bytes

....1I>sO)su.@?(O

Try it online!

cubified:

    . .
    . .
1 I > s O ) s u
. @ ? ( O . . .
    . .
    . .

Pushes 1, reads in the input (I), then enters the loop which swaps the top of the stack, outputs it, decrements, swaps, outputs the top of the stack, decrements, and stops if the top of the stack is 0.

Cubix, 17 bytes

....1I>sO)su.@?(O

Try it online!

cubified:

    . .
    . .
1 I > s O ) s u
. @ ? ( O . . .
    . .
    . .

Pushes 1, reads in the input (I), then enters the loop which swaps the top of the stack, outputs it, increments, swaps, outputs the top of the stack, decrements, and stops if the top of the stack is 0.

Source Link
Giuseppe
  • 28.8k
  • 3
  • 31
  • 105

Cubix, 17 bytes

....1I>sO)su.@?(O

Try it online!

cubified:

    . .
    . .
1 I > s O ) s u
. @ ? ( O . . .
    . .
    . .

Pushes 1, reads in the input (I), then enters the loop which swaps the top of the stack, outputs it, decrements, swaps, outputs the top of the stack, decrements, and stops if the top of the stack is 0.