Const N = 10; var
arr: array[1..N] of integer;
i: byte;
begin
randomize;
for i:=1 to N do begin
arr[i] := random(100) - 50;
write(arr[i]:4);
end;
writeln;
for i:=1 to N do
arr[i] := -1 * arr[i];
for i:=1 to N do
write(arr[i]:4);
writeln;
end.
Что значит последний цикл?
const
N = 10;
var
a: array[1..N] of integer;
i, k, j, new_x: integer;
begin
randomize;
writeln('Исходный массив:');
for i := 1 to N do
begin
a[i] := random(100) - 50;
write(a[i], ' ');
end;
writeln;