Loops/For with a specified step: Difference between revisions

Content added Content deleted
No edit summary
Line 170: Line 170:
main = do forM_ [2,4..8] (\x -> putStr (show x ++ ", "))
main = do forM_ [2,4..8] (\x -> putStr (show x ++ ", "))
putStrLn "who do we appreciate?"</lang>
putStrLn "who do we appreciate?"</lang>

=={{header|HicEst}}==
<lang hicest>DO i = 1, 6, 1.25 ! from 1 to 6 step 1.25
WRITE() i
ENDDO</lang>

=={{header|J}}==
=={{header|J}}==
<lang J> ' who do we appreciate?' ,~ ": 2 * >: i.4
<lang J> ' who do we appreciate?' ,~ ": 2 * >: i.4