var a:array [1..10] of integer;
i,k:integer;
begin
write ('Массив ');
for i:=1 to 10 do
a[i]:=random(201)-100;
write (a[i]:5);
if a[i]<0 then k:=k+1
end;
writeln;
writeln('Количество отрицательных чисел ',k)
end.
===== PascalABC.NET =====
var a := ArrRandom(10, -100, 100);
a.Println.Where(p -> p < 0).Count.Println
var a:array [1..10] of integer;
i,k:integer;
begin
write ('Массив ');
for i:=1 to 10 do
begin
a[i]:=random(201)-100;
write (a[i]:5);
if a[i]<0 then k:=k+1
end;
writeln;
writeln('Количество отрицательных чисел ',k)
end.
===== PascalABC.NET =====
var a := ArrRandom(10, -100, 100);
a.Println.Where(p -> p < 0).Count.Println
end.