Loops/For with a specified step: Difference between revisions

(→‎{{header|Perl 6}}: Use a magic arithmetic series.)
Line 174:
print *, i
end do</lang>
 
=={{header|F_Sharp|F#}}==
<lang fsharp>for i in 2..2..8 do
printf "%d, " i
printfn "done"</lang>
 
Output:
<pre>2, 4, 6, 8, done
</pre>
 
=={{header|Go}}==
Anonymous user