Program Nuli; uses Crt; const M=8; type Mat = array [1..M,1..M] of integer; var i,j: integer; A: Mat;
begin ClrScr; WriteLn ('Old Massiv:'); for i:=1 to M do begin for j:=1 to M do begin A[i,j]:=10+random(90); Write(A[i,j]:4); end; WriteLn; end; WriteLn; WriteLn ('New Massiv:'); for i:=1 to M do for j:=1 to M do if j<=(M-i) then A[i,j]:=0; for i:=1 to M do begin for j:=1 to M do begin Write(A[i,j]:4); end; WriteLn; end; WriteLn; ReadLn; end.
uses Crt;
const M=8;
type Mat = array [1..M,1..M] of integer;
var i,j: integer;
A: Mat;
begin
ClrScr;
WriteLn ('Old Massiv:');
for i:=1 to M do
begin
for j:=1 to M do
begin
A[i,j]:=10+random(90);
Write(A[i,j]:4);
end;
WriteLn;
end;
WriteLn;
WriteLn ('New Massiv:');
for i:=1 to M do
for j:=1 to M do
if j<=(M-i) then A[i,j]:=0;
for i:=1 to M do
begin
for j:=1 to M do
begin
Write(A[i,j]:4);
end;
WriteLn;
end;
WriteLn;
ReadLn;
end.