Loops/For with a specified step: Difference between revisions

Content added Content deleted
(adding sas)
(→‎{{header|MATLAB}} / {{header|Octave}}: loops with step size different than 1)
Line 455: Line 455:
17
17
</pre>
</pre>

=={{header|MATLAB}} / {{header|Octave}}==

<lang Matlab> for k = 0:10:100,
printf('%d\n',k)
end; </lang>

A vectorized version of the code is

<lang Matlab> printf('%d\n',0:10:100); </lang>


=={{header|Modula-2}}==
=={{header|Modula-2}}==