Program Diagonal; uses Crt; const n = 5; Type Mas = array [1..n, 1..n] of integer; Vec = array [1..n*n] of integer; var A: Mas; V: Vec; i, j , k: integer; p : longint; begin ClrScr; Randomize; p:=1; WriteLn('Massiv A:'); for i:=1 to n do begin for j:= 1 to n do begin A[i, j]:= 1+random (9); p:=p*A[i,i]; Write(A[i, j]:4); end; WriteLn; WriteLn; end; k:=0; for i:=1 to n do for j:=1 to n do begin if (A[i,j]>p) and (j<i) then begin k:=k+1; V[k]:=A[i, j]; end; end; WriteLn('Vector V='); for j:=1 to k do Write(V[j]:4);
WriteLn; if k=0 then Writeln ('None'); ReadLn; end.
uses Crt;
const n = 5;
Type Mas = array [1..n, 1..n] of integer;
Vec = array [1..n*n] of integer;
var A: Mas;
V: Vec;
i, j , k: integer;
p : longint;
begin
ClrScr;
Randomize;
p:=1;
WriteLn('Massiv A:');
for i:=1 to n do
begin
for j:= 1 to n do
begin
A[i, j]:= 1+random (9);
p:=p*A[i,i];
Write(A[i, j]:4);
end;
WriteLn; WriteLn;
end;
k:=0;
for i:=1 to n do
for j:=1 to n do
begin
if (A[i,j]>p) and (j<i) then
begin
k:=k+1;
V[k]:=A[i, j];
end;
end;
WriteLn('Vector V=');
for j:=1 to k do
Write(V[j]:4);
WriteLn;
if k=0 then Writeln ('None');
ReadLn;
end.