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

7 lines
245 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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}