Глава 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,10 @@
import std.stdio;
void main()
{
int[] a = new int[5]; // Соз­дать мас­сив из пя­ти це­лых чи­сел
int[] b = a[3 .. 5]; // b ссы­ла­ет­ся на два по­след­них эле­мен­та a
b[0] = 1;
b[1] = 3;
assert(a == [ 0, 0, 0, 1, 3 ]); // a был из­ме­нен
}