RosettaCodeData/Task/Loops-While/DUP/loops-while-2.dup
2017-09-25 22:28:19 +02:00

6 lines
245 B
Text

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}