Program foo; var b : array[1..3] of array[1..3] of integer; c : integer; i, j : byte;
begin writeln('Заполните массив:'); for i := 1 to 3 do begin writeln('Строка ', i); for j := 1 to 3 do readln(b[i][j]); end;
c := 0; for i:=1 to 3 do begin for j:=1 to 3 do begin write(b[i][j]:5, ' '); if b[i][j] > 0 then inc(c, 1); end; writeln; end; writeln('Найдено ', c, ' положительных элементов');
var
b : array[1..3] of array[1..3] of integer;
c : integer;
i, j : byte;
begin
writeln('Заполните массив:');
for i := 1 to 3 do begin
writeln('Строка ', i);
for j := 1 to 3 do
readln(b[i][j]);
end;
c := 0;
for i:=1 to 3 do begin
for j:=1 to 3 do begin
write(b[i][j]:5, ' ');
if b[i][j] > 0 then inc(c, 1);
end;
writeln;
end;
writeln('Найдено ', c, ' положительных элементов');
end.