Loops/While: Difference between revisions

m
→‎{{header|E}}: Added code for the Euphoria language, + explanation.
(added Inform 7 solution)
m (→‎{{header|E}}: Added code for the Euphoria language, + explanation.)
Line 195:
i //= 2
}</lang>
 
=={{header|Euphoria}}==
<lang Euphoria>
integer i
i = 1024
 
while i > 0 do
printf(1, "%g\n", {i})
i = floor(i/2) --Euphoria does NOT use integer division. 1/2 = 0.5
end while
</lang>
Even without the <code>floor()</code> the code will in fact end. But it's FAR beyond 1.
 
=={{header|Factor}}==
14

edits