Program gulkakh; const n=5; var a:array[1..n,1..n] of integer; i,j,k,max,stroka:integer; begin writeln('Исходная матрица:'); for i:=1 to n do for j:=1 to n do begin a[i,j]:=random(20)-10; write(a[i,j],' '); if j=n then writeln; end;
stroka:=1; max:=a[1,1];
for i:=1 to n do for j:=1 to n do begin if max<a[i,j] then begin max:=a[i,j]; stroka:=i; end; end;
k:=n;
for i:=stroka to n-1 do for j:=1 to n do a[i,j]:=a[i+1,j]; k:=k-1; writeln('Без удаленной строки:'); for i:=1 to k do for j:=1 to n do begin write(a[i,j],' '); if j=n then writeln; end; end.
const n=5;
var a:array[1..n,1..n] of integer;
i,j,k,max,stroka:integer;
begin
writeln('Исходная матрица:');
for i:=1 to n do
for j:=1 to n do begin
a[i,j]:=random(20)-10;
write(a[i,j],' ');
if j=n then writeln;
end;
stroka:=1;
max:=a[1,1];
for i:=1 to n do
for j:=1 to n do begin
if max<a[i,j] then begin
max:=a[i,j];
stroka:=i;
end;
end;
k:=n;
for i:=stroka to n-1 do
for j:=1 to n do
a[i,j]:=a[i+1,j];
k:=k-1;
writeln('Без удаленной строки:');
for i:=1 to k do
for j:=1 to n do begin
write(a[i,j],' ');
if j=n then writeln;
end;
end.
program raf105;
const
n = 3; //Размер матрицы
var
a: array[1..n,1..n] of real;
max: real;
i,j: integer;
begin
max:= -10000;
writeln('Вводите ',n*n,' чисел по очереди');
for i:=1 to n do
for j:=1 to n do
begin
readln(a[i,j]);
if a[i,j] > max
then max:= a[i,j];
end;
for i:=1 to n do
begin
writeln;
for j:=1 to n do
begin
if a[i,j] < 0
then a[i,j]:= a[i,j] / max;
write(a[i,j]:5:2,' ');
end;
end;
end.
PascalABC 3.4.2