Loops/While: Difference between revisions
m
added output
No edit summary |
m (added output) |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1,046:
40 LET I=INT (I/2)
50 GOTO 20</syntaxhighlight>
==={{header|SmallBASIC}}===
i = 1024
PRINT i
i = i \ 2 ' Using \ for integer division instead of /
==={{header|TI-83 BASIC}}===
Line 1,564 ⟶ 1,572:
=={{header|Elena}}==
ELENA
<syntaxhighlight lang="elena">public program()
{
Line 1,570 ⟶ 1,578:
while (i > 0)
{
console.writeLine
i /= 2
Line 2,162 ⟶ 2,170:
=={{header|langur}}==
<syntaxhighlight lang="langur">var .i = 1024
while .i > 0 {
▲}</syntaxhighlight>
▲<syntaxhighlight lang="langur">var .i = 1024
▲for .i > 0 {
writeln .i
.i \= 2
Line 3,278 ⟶ 3,276:
end while;
end func;</syntaxhighlight>
{{out}}
<pre>
1024
512
256
128
64
32
16
8
4
2
1
</pre>
=={{header|SenseTalk}}==
Line 3,762 ⟶ 3,774:
=={{header|Wren}}==
<syntaxhighlight lang="
while (i > 0) {
System.print(i)
|