Loops/For with a specified step: Difference between revisions

adding gap
(adding gap)
Line 423:
<pre>2, 4, 6, 8, done
</pre>
 
=={{header|GAP}}==
# Use a range [a, b .. c], where the step is b-a (b is the value following a), and c-a must be a multiple of the step
<lang gap>for i in [1, 3 .. 11] do
Print(i, "\n");
od;
 
1
3
5
7
9
11
</lang>
 
=={{header|GML}}==
Anonymous user