ответ:
program example;
uses math;
var i: integer;
a: array [1..10] of integer;
b: array [1..10] of integer;
begin
writeln('исходный массив: ');
randomize;
for i : = 1 to 10 do
a[i] : = randomrange(-50,50);
write(a[i], ' ');
end;
writeln;
writeln(' массив: ');
b[i] : = sqr(a[i]);
write(b[i], ' ');
end.
ответ:
program example;
uses math;
var i: integer;
a: array [1..10] of integer;
b: array [1..10] of integer;
begin
writeln('исходный массив: ');
randomize;
for i : = 1 to 10 do
begin
a[i] : = randomrange(-50,50);
write(a[i], ' ');
end;
writeln;
writeln(' массив: ');
for i : = 1 to 10 do
begin
b[i] : = sqr(a[i]);
write(b[i], ' ');
end;
end.