const n=8;
var i,j,v,max,k:integer;
a:array [1..n] of integer = (0,1,9,2,4,3,6,5);
begin
write (' Исходный массив: ');
for i:=1 to n do write(a[i],' ');
writeln;
for i:=1 to n-1 do
begin
max:=i;
for j:=i+1 to n do
if a[j] > a[max] then max:=j;
v:=a[i];
a[i]:=a[max];
a[max]:=v
end;
write ('Преобразованный массив: ');
for i:=1 to n do write(a[i],' ');
end.
ПОЖАЛУЙСТА Задача:1 D[1..2,1..6] числами 12,32,41,3,4,7,9,19,23,24,27,39 Задача 2: T[1..10,1..10] от 6 до 43.
Евгений9112
// PascalABC.NET 3.0, сборка 1144 от 16.01.2016
begin
var a:array[1..2,1..6] of integer:=
((12,32,41,3,4,7),(9,19,23,24,27,39));
Writeln(a);
var b:=MatrixRandom(10,10,6,43);
Writeln(b)
end.
Тестовое решение:
[[12,32,41,3,4,7],[9,19,23,24,27,39]]
[[29,39,20,21,36,34,10,25,32,40],[35,12,21,17,32,7,38,25,41,29],[6,33,17,19,30,25,34,37,21,23],[11,36,12,14,36,39,14,26,33,33],[17,34,39,30,14,34,29,19,20,26],[31,11,23,43,14,39,28,6,34,17],[43,17,10,15,35,42,6,13,25,36],[37,18,35,13,18,15,38,31,11,40],[39,21,22,38,36,43,18,12,43,40],[17,13,35,22,34,43,30,29,38,15]]