June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -9,4 +9,20 @@ Show the following output using one loop.
Try to achieve the result by forcing the next iteration within the loop
upon a specific condition, if your language allows it.
;Related tasks:
*   [[Loop over multiple arrays simultaneously]]
*   [[Loops/Break]]
*   [[Loops/Continue]]
*   [[Loops/Do-while]]
*   [[Loops/Downward for]]
*   [[Loops/For]]
*   [[Loops/For with a specified step]]
*   [[Loops/Foreach]]
*   [[Loops/Increment loop index within loop body]]
*   [[Loops/Infinite]]
*   [[Loops/N plus one half]]
*   [[Loops/Nested]]
*   [[Loops/While]]
<br><br>

View file

@ -0,0 +1,6 @@
import std.stdio;
void main()
{
foreach(i; 1..11) i % 5 ? writef("%s, ", i) : writeln(i);
}

View file

@ -0,0 +1,7 @@
repeat i 10 [
prin i
if i = 10 [break]
either i = 5 [print ""][prin ","]
]
1,2,3,4,5
6,7,8,9,10