Const n=10; var a:array[1..n] of integer; s,sr,i:integer; begin writeln('vvedite massiv='); for i := 1 to n do readln(a[i]); s:=0; for i := 1 to n do begin s:=s+a[i]; sr:=s/n; end; for i := 1 to n do if a[i]>15 then a[i]:=sr; writeln('noviy='); for i :=1 to n do write(a[i]:4); readln; end.
var a:array[1..n] of integer;
s,sr,i:integer;
begin
writeln('vvedite massiv=');
for i := 1 to n do
readln(a[i]);
s:=0;
for i := 1 to n do begin
s:=s+a[i];
sr:=s/n;
end;
for i := 1 to n do
if a[i]>15 then a[i]:=sr;
writeln('noviy=');
for i :=1 to n do
write(a[i]:4);
readln;
end.