Loops/While: Difference between revisions
Content added Content deleted
(Modula-3) |
|||
Line 22: | Line 22: | ||
</ada> |
</ada> |
||
=={{header|ALGOL 68}}== |
|||
{{works with|ALGOL 68|Standard - no extensions to language used}} |
|||
{{works with|ALGOL 68G|Any - tested with release mk15-0.8b.fc9.i386}} |
|||
{{works with|ELLA ALGOL 68|Any (with appropriate job cards) - tested with release 1.8.8d.fc9.i386}} |
|||
<pre> |
|||
INT i := 1024; |
|||
WHILE i > 0 DO |
|||
print((i)); |
|||
i := i OVER 2 |
|||
OD |
|||
</pre> |
|||
Output: |
|||
<pre> |
|||
+1024 +512 +256 +128 +64 +32 +16 +8 +4 +2 +1 |
|||
</pre> |
|||
=={{header|BASIC}}== |
=={{header|BASIC}}== |
||
{{works with|QuickBasic|4.5}} |
{{works with|QuickBasic|4.5}} |