RosettaCodeData/Task/Loops-While/PostScript/loops-while.ps
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07: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