Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Loops-Nested/D/loops-nested.d
Normal file
18
Task/Loops-Nested/D/loops-nested.d
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import std.stdio, std.random;
|
||||
|
||||
void main() {
|
||||
int[10][10] mat;
|
||||
foreach (ref row; mat)
|
||||
foreach (ref item; row)
|
||||
item = uniform(1, 21);
|
||||
|
||||
outer:
|
||||
foreach (row; mat)
|
||||
foreach (item; row) {
|
||||
write(item, ' ');
|
||||
if (item == 20)
|
||||
break outer;
|
||||
}
|
||||
|
||||
writeln();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue