Program mas; uses crt; var X:array [1..8,1..7] of integer; i,j,a,b:integer; begin clrscr; write('Введите диапазон значений заполнения(A-начальное значение, B-конечное): '); repeat read(a,b); until a<=b; writeln; randomize; for i:=1 to 8 do for j:=1 to 7 do X[i,j]:=random(b-a+1)+a; writeln('Ваш массив:'); for i:=1 to 8 do begin for j:=1 to 7 do write(X[i,j]:5); writeln; end; for i:=1 to 8 do for j:=1 to 3 do X[i,j]:=sqr(X[i,j]); writeln; writeln('Рeзультат:'); for i:=1 to 8 do begin for j:=1 to 7 do write(X[i,j]:5); writeln; end; readkey; end.
uses crt;
var X:array [1..8,1..7] of integer; i,j,a,b:integer;
begin
clrscr;
write('Введите диапазон значений заполнения(A-начальное значение, B-конечное): ');
repeat
read(a,b);
until a<=b;
writeln;
randomize;
for i:=1 to 8 do
for j:=1 to 7 do X[i,j]:=random(b-a+1)+a;
writeln('Ваш массив:');
for i:=1 to 8 do
begin
for j:=1 to 7 do write(X[i,j]:5);
writeln;
end;
for i:=1 to 8 do
for j:=1 to 3 do X[i,j]:=sqr(X[i,j]);
writeln;
writeln('Рeзультат:');
for i:=1 to 8 do begin for j:=1 to 7 do write(X[i,j]:5);
writeln;
end;
readkey;
end.