RosettaCodeData/Task/Loops-While/PostScript/loops-while.ps
2023-07-01 13:44:08 -04:00

9 lines
185 B
PostScript

1024
{
dup 0 le % check whether still greater than 0
{ pop exit } % if not, exit the loop
if
dup = % print the number
2 idiv % divide by two
}
loop