var a : array [1..9] of integer = ((12), (24), (3), (4), (16), (15), (7), (18), (27)); sum, count, i : integer; begin sum := 0; count := 0; for i := 1 to 9 do if a[i] > 10 then begin inc (count); inc (sum, a[i]); end; writeln ('Таких элементов ', count); if count > 0 then begin writeln ('Их сумма ', sum); writeln ('Их среднее арифметическое ', sum / count); end; end.
var
a : array [1..9] of integer = ((12), (24), (3), (4), (16), (15), (7), (18), (27));
sum, count, i : integer;
begin
sum := 0;
count := 0;
for i := 1 to 9 do
if a[i] > 10 then
begin
inc (count);
inc (sum, a[i]);
end;
writeln ('Таких элементов ', count);
if count > 0 then
begin
writeln ('Их сумма ', sum);
writeln ('Их среднее арифметическое ', sum / count);
end;
end.