Program Z_n;
var a:array[1..10] of integer;
i,m:integer;
Begin
Randomize;
Write('Исходный массив: ');
m:=-1000;
For i:=1 to 10 do begin
a[i]:=Random(50);
Write(a[i],' ');
if a[i]>m then m:=a[i];
end;
writeln;
Write('Массив после обработки: ');
For i:=1 to 10 do begin
if a[i]<>m then a[i]:=0;
Write(a[i],' ');
end;
writeln;
end.