program lab5;
uses crt;
const n=10;
m=10;
var a,b:array [1..n,1..m] of longint;
c:array [1..n] of longint;
i,j,k:integer;
max,f:longint;
begin
clrscr;
randomize;
for i:=1 to n do
begin
f:=1;
for j:=1 to m do
begin
if i=j then f:=1 else
if j>i then f:=f*abs(j-i) else
a[i,j]:=(-1)*(100-f);
write(a[i,j]:7);
end;
writeln;
end;
writeln;
max:=a[1,1];
for j:=1 to m do
begin
for i:=1 to n do
if a[i,j]>max then max:=a[i,j];
write(max:7);
max:=a[1,1];
end;
writeln;
writeln;
for i:=1 to n do
begin
for j:=1 to m do
begin
b[i,j]:=a[n+1-i,n+1-j];
write(b[i,j]:7);
end;
writeln;
end;
repeat
until keypressed;
end.
Сообщение отредактировано: Diablo -