Loops/While: Difference between revisions

No edit summary
Line 345:
end
in loop 1024</lang>
 
=={{header|Octave}}==
<lang octave>i = 1024;
while (i > 0)
disp(i)
i = floor(i/2);
endwhile</lang>
 
The usage of the type int32 is not convenient, since the math is done floating point, then rounding to integer, so that 1/2 will be always 1 and never 0.
 
=={{header|Pascal}}==