Program primer; const n=10; var f:array[1..n] of integer; k,s,m:integer; sr:real; begin writeln ('vvedite massiv'); for m:=1 to n do readln( f[m]); k:=0; s:=0; for m:=1 to n do if f[m]>0 then begin s:=s+f[m]; inc(k); end; sr:=s/k; writeln('sr=',sr); readln; end.
const n=10;
var f:array[1..n] of integer;
k,s,m:integer; sr:real;
begin
writeln ('vvedite massiv');
for m:=1 to n do
readln( f[m]);
k:=0;
s:=0;
for m:=1 to n do
if f[m]>0 then begin
s:=s+f[m];
inc(k);
end;
sr:=s/k;
writeln('sr=',sr);
readln;
end.