RosettaCodeData/Task/Loops-While/DUP/loops-while-2.dup

7 lines
245 B
Plaintext

1024 {push 1024 on stack}
[ ][ ]# {while[condition>0][do]}
$ {DUP}
$. {DUP, print top of stack to STDOUT}
10, {print newline}
2/\% {2 DIV/MOD SWAP POP}