Адриан Сивак
Профи
(687)
14 лет назад
const n=5;
var x: array [1..n] of integer;
i,k:integer;
s,sr:real;
begin
writeln('vvedite elementi massiva');
for i:=1 to n do begin
write(' ',i,'-element');
readln(x);
end;
writeln(' massiv -');
for i:=1 to n do begin
write(x,' ');
end;
s:=0;
k:=0;
for i:=1 to n do begin
if (x>0) then begin s:=s+x; inc(k) end;
end;
sr:=s/k;
writeln(' sredne orifmiti4eskoe pol. elementov=', sr);
readln;
end.