Loops/For with a specified step: Difference between revisions

Content added Content deleted
(added haskell)
(add Tcl)
Line 30: Line 30:
Output
Output
<pre>2, 4, 6, 8, who do we appreciate?</pre>
<pre>2, 4, 6, 8, who do we appreciate?</pre>

=={{header|Tcl}}==
<lang tcl>for {set i 2} {$i <= 8} {incr i 2} {
puts -nonewline "$i, "
}
puts "enough with the cheering already!"</lang>