Const n=7; var a:array[1..n,1..n] of integer; i,j:integer; begin Randomize; writeln('Исходный массив:'); for i:=1 to n do begin for j:=1 to n do begin a[i,j]:=random(81)+10; write(a[i,j]:4); end; writeln; end; for i:=2 to n-1 do for j:=n-i+1 to n-1 do a[i,j]:=99; writeln('Полученный массив:'); for i:=1 to n do begin for j:=1 to n do write(a[i,j]:4); writeln; end; end.
Answers & Comments
Verified answer
Const n=7;var a:array[1..n,1..n] of integer;
i,j:integer;
begin
Randomize;
writeln('Исходный массив:');
for i:=1 to n do
begin
for j:=1 to n do
begin
a[i,j]:=random(81)+10;
write(a[i,j]:4);
end;
writeln;
end;
for i:=2 to n-1 do
for j:=n-i+1 to n-1 do a[i,j]:=99;
writeln('Полученный массив:');
for i:=1 to n do
begin
for j:=1 to n do write(a[i,j]:4);
writeln;
end;
end.
Пример:
Исходный массив:
44 50 52 37 40 25 68
25 20 54 12 85 66 47
75 71 15 78 75 57 25
89 17 34 86 77 45 22
22 77 89 88 61 68 23
11 43 84 21 13 27 11
35 69 35 80 44 64 42
Полученный массив:
44 50 52 37 40 25 68
25 20 54 12 85 99 47
75 71 15 78 99 99 25
89 17 34 99 99 99 22
22 77 99 99 99 99 23
11 99 99 99 99 99 11
35 69 35 80 44 64 42