Jump to content

Loops/While: Difference between revisions

no edit summary
No edit summary
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.
 
=={{header|ActionScript}}==
<actionscript>
var i:int = 1024;
while (i > 0) {
trace(i);
i /= 2;
}
</actionscript>
 
=={{header|Ada}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.