Loops/While: Difference between revisions

Content added Content deleted
No edit summary
Line 1: Line 1:
{{task|Iteration}}Start an integer value at 1024. Loop while it is greater than 0. Print the value (with a newline) and divide it by two each time through the loop.
{{task|Iteration}}Start an integer value at 1024. Loop while it is greater than 0. Print the value (with a newline) and divide it by two each time through the loop.

=={{header|ActionScript}}==
<actionscript>
var i:int = 1024;
while (i > 0) {
trace(i);
i /= 2;
}
</actionscript>


=={{header|Ada}}==
=={{header|Ada}}==