Объяснение:
var arr : array[1..10] of Integer;
max, i : Integer;
begin
randomize;
for i := 1 to 10 do arr[i] := Random(100) - 50;
max := arr[1];
for i := 2 to 10 do if arr[i] > max then max := arr[i];
writeln('max = ', max);
writeln('max^2 = ',max * max);
end.
Объяснение:
var arr : array[1..10] of Integer;
max, i : Integer;
begin
randomize;
for i := 1 to 10 do arr[i] := Random(100) - 50;
max := arr[1];
for i := 2 to 10 do if arr[i] > max then max := arr[i];
writeln('max = ', max);
writeln('max^2 = ',max * max);
end.