Глава 2 закончена

This commit is contained in:
Alexander Zhirov 2023-01-23 00:14:13 +03:00
parent 42b2af19c0
commit 09dc3df444
18 changed files with 261 additions and 1 deletions

View file

@ -0,0 +1,16 @@
import std.stdio;
void main()
{
auto arr1 = new int[4];
assert(arr1.length == 4);
assert(arr1 == [ 0, 0, 0, 0 ]); // Ини­циа­ли­зи­ро­ван по умол­ча­нию
auto arr2 = new int[](4);
assert(arr2.length == 4);
assert(arr2 == [ 0, 0, 0, 0 ]); // Ини­циа­ли­зи­ро­ван по умол­ча­нию
auto matrix = new int[][](4, 8);
assert(matrix.length == 4);
assert(matrix[0].length == 8);
}