Ответ:
pascal
Объяснение:
var m, h, i, j, s: integer;
a: array[,] of integer;
b: array of real;
begin
Write('Введите размер массива А[ М х Н ]: '); ReadLn(m, h);
SetLength(a, m, h);
SetLength(b, m);
for i := 0 to m - 1 do
for j := 0 to h - 1 do begin
Write('A[', i, ',', j, '] = '); ReadLn(a[i, j]);
end;
for i := 0 to m - 1 do begin
for j := 0 to h - 1 do Write(a[i, j]:4);
WriteLn;
s := 0;
for i := 0 to m - 1 do s := s + a[i, j];
b[j] := s / m;
WriteLn('B[', j, '] = ', b[j]);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
pascal
Объяснение:
var m, h, i, j, s: integer;
a: array[,] of integer;
b: array of real;
begin
Write('Введите размер массива А[ М х Н ]: '); ReadLn(m, h);
SetLength(a, m, h);
SetLength(b, m);
for i := 0 to m - 1 do
for j := 0 to h - 1 do begin
Write('A[', i, ',', j, '] = '); ReadLn(a[i, j]);
end;
for i := 0 to m - 1 do begin
for j := 0 to h - 1 do Write(a[i, j]:4);
WriteLn;
end;
for j := 0 to h - 1 do begin
s := 0;
for i := 0 to m - 1 do s := s + a[i, j];
b[j] := s / m;
WriteLn('B[', j, '] = ', b[j]);
end;
end.