ПОЖАЛУЙСТА Задача: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]]
Const
maxn = 4;
maxm = 5;
type
myarr = array [1..maxn, 1..maxm] of longint;
var
a: myarr;
sum, i, j: longint;
begin
for i := 1 to 4 do begin
for j := 1 to 5 do begin
a[i, j] := i * j;
write(a[i, j], ' ');
end;
writeln;
end;
sum := 0;
for j := 1 to 5 do begin
for i := 1 to 4 do
if (a[i, j] mod 3 = 0) then
sum := sum + a[i, j];
writeln('Сумма чисел, кратных 3, в ', j, ' столбце равна ', sum);
sum := 0;
end;
end.