Program Podchet; var i, j ,ans: integer; a: array [1..6,1..3] of integer;
begin writeln('Введите матрицу 6х3'); ans := 0; for i := 1 to 6 do for j := 1 to 3 do read(a[i, j]); for i := 1 to 3 do begin for j := 1 to 6 do if (a[j, i] < 3) then ans := ans + a[j, i]; end; writeln(ans); ans := 0; end;end.
var i, j ,ans: integer;
a: array [1..6,1..3] of integer;
begin writeln('Введите матрицу 6х3');
ans := 0; for i := 1 to 6 do for j := 1 to 3 do read(a[i, j]);
for i := 1 to 3 do begin for j := 1 to 6 do if (a[j, i] < 3) then ans := ans + a[j, i]; end; writeln(ans); ans := 0; end;end.