Loops/For with a specified step: Difference between revisions
Content added Content deleted
(Add new section for Lisaac) |
(PowerShell) |
||
Line 226: | Line 226: | ||
Output |
Output |
||
<pre>2, 4, 6, 8, who do we appreciate?</pre> |
<pre>2, 4, 6, 8, who do we appreciate?</pre> |
||
=={{header|PowerShell}}== |
|||
<lang powershell>for ($i = 0; $i -lt 10; $i += 2) { |
|||
$i |
|||
}</lang> |
|||
=={{header|Python}}== |
=={{header|Python}}== |
||
Line 238: | Line 243: | ||
Output |
Output |
||
<pre>2, 4, 6, 8, who do we appreciate?</pre> |
<pre>2, 4, 6, 8, who do we appreciate?</pre> |
||
=={{header|R}}== |
=={{header|R}}== |
||
<lang R>for(a in seq(2,8,2)) { |
<lang R>for(a in seq(2,8,2)) { |