RosettaCodeData/Task/Loops-While/REXX/loops-while-3.rexx

8 lines
462 B
Rexx

/*REXX program demonstrates a DO WHILE with index reduction construct.*/
x=1024 /*define the initial value of X.*/
do while x>>0 /*this is an exact comparison. */
say right(x,10) /*pretty output by aligning right*/
x=x%2 /*in REXX, % is integer division.*/
end
/*stick a fork in it, we're done.*/