program CountElementsLessThanSix;
vararr: array[1..10] of Integer;i, count: Integer;
begincount := 0;
// Заполняем массив случайными числами от 1 до 10for i := 1 to 10 dobeginarr[i] := Random(10) + 1;Write(arr[i], ' ');
end;
Writeln;Writeln('Number of elements less than 6: ', count);
end.
program CountElementsLessThanSix;
var
arr: array[1..10] of Integer;
i, count: Integer;
begin
count := 0;
// Заполняем массив случайными числами от 1 до 10
if arr[i] < 6 thenfor i := 1 to 10 do
begin
arr[i] := Random(10) + 1;
Write(arr[i], ' ');
count := count + 1;
end;
Writeln;
Writeln('Number of elements less than 6: ', count);
end.