Const n=10; var a: array[1..n] of integer; i,m,n,max:integer; begin randomize; a[1]:=random(300); max:=a[1]; write(a[1],' '); for i:=2 to n do begin a[i]:=random(300); if a[i]>max then max:=a[i]; write(a[i],' '); end; writeln;
for i:=1 to n do if (a[i]>0 then a[i]:=a[i]*max; for i:=1 to n do write(a[i],' '); end.
var a: array[1..n] of integer;
i,m,n,max:integer;
begin
randomize;
a[1]:=random(300);
max:=a[1];
write(a[1],' ');
for i:=2 to n do
begin
a[i]:=random(300);
if a[i]>max then max:=a[i];
write(a[i],' ');
end;
writeln;
for i:=1 to n do
if (a[i]>0 then a[i]:=a[i]*max;
for i:=1 to n do
write(a[i],' ');
end.