===== №1 =====
begin
var a:= ArrRandom(15, -20, 20);
a.Println;
Println('Ненулевых:', a.Count(p -> p <> 0));
Swap(a[1], a[a.IndexMax]);
a.Println
end.
===== №2 =====
var a := MatrRandom(8, 10, -99, 99);
a.Println(4);
Writeln;
a.Cols.Select(col -> col.Count(p -> p > 0)).
Foreach(p -> Write(p:4))
===== №1 =====
begin
var a:= ArrRandom(15, -20, 20);
a.Println;
Println('Ненулевых:', a.Count(p -> p <> 0));
Swap(a[1], a[a.IndexMax]);
a.Println
end.
===== №2 =====
begin
var a := MatrRandom(8, 10, -99, 99);
a.Println(4);
Writeln;
a.Cols.Select(col -> col.Count(p -> p > 0)).
Foreach(p -> Write(p:4))
end.