June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
|
|
@ -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>
|
||||
|
|
|
|||
6
Task/Loops-Continue/D/loops-continue-2.d
Normal file
6
Task/Loops-Continue/D/loops-continue-2.d
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import std.stdio;
|
||||
|
||||
void main()
|
||||
{
|
||||
foreach(i; 1..11) i % 5 ? writef("%s, ", i) : writeln(i);
|
||||
}
|
||||
7
Task/Loops-Continue/Red/loops-continue.red
Normal file
7
Task/Loops-Continue/Red/loops-continue.red
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue