Anonymous user
Loops/While: Difference between revisions
→{{header|Matlab}}
Line 278:
]</lang>
=={{header|
In Matlab (like Octave) the math is done floating point, then rounding to integer, so that 1/2 will be always 1 and never 0. A 'floor' is used to round the number.
<lang Matlab>i = 1024;
while (i > 0)
disp(i);
i = floor(i/2);
end</lang>
=={{header|MAXScript}}==
|