Допустим дана последовательность числе из n элементов Pascal var mas:array[1..100] of integer; n2,sum,i,n:intger; begin readln(n); sum:=0; n2:=0; for i:=1 to n do read(mas[i]); for i:=1 to n do begin if (mas[i] mod 3 = 0) and (mas[i]>9) and (mas[i]<100) then begin n2:=n2+1; sum:=sum+mas[i]; end; end; writeln(sum/n2); end.
Pascal
var
mas:array[1..100] of integer;
n2,sum,i,n:intger;
begin
readln(n);
sum:=0;
n2:=0;
for i:=1 to n do
read(mas[i]);
for i:=1 to n do
begin
if (mas[i] mod 3 = 0) and (mas[i]>9) and (mas[i]<100) then
begin
n2:=n2+1;
sum:=sum+mas[i];
end;
end;
writeln(sum/n2);
end.