Перенос страниц
This commit is contained in:
parent
4d57446057
commit
4c954c9186
129 changed files with 14 additions and 15 deletions
|
@ -0,0 +1,29 @@
|
|||
import std.stdio, std.random;
|
||||
|
||||
void main()
|
||||
{
|
||||
int[128] someInts;
|
||||
|
||||
int[3] a;
|
||||
assert(a == [0, 0, 0]);
|
||||
|
||||
int[3] b = [1, 2, 3];
|
||||
assert(b == [1, 2, 3]);
|
||||
|
||||
int[4] c = -1;
|
||||
assert(c == [-1, -1, -1, -1]);
|
||||
|
||||
int[1024] d = void;
|
||||
|
||||
double[10] array;
|
||||
foreach (i; 0 .. array.length)
|
||||
{
|
||||
array[i] = uniform(0.0, 1.0);
|
||||
}
|
||||
writeln(array);
|
||||
foreach (ref element; array)
|
||||
{
|
||||
element = uniform(0.0, 1.0);
|
||||
}
|
||||
writeln(array);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue