7.0



8.4. - - 3


2

:

.

,

- A B .

1.

.

Program P2_P;

Type

Matr = array[1..5, 1..7) of real;

Var

A, B: Matr;

i, j, KA, KB, C: integer;

Procedure CP(D: Matr; m, n: integer; Var KD: integer);

var

i, j: integer;

begin

KD := 0;

for i := 1 to m do

for j := 1 to n do

if d[i,j]>0 then KD := KD + 1;

end;

Begin { }

writeln( A);

for i := 1 to 5 do

for j := 1 to 6 do read(a[i,j]);

writeln( ’);

for i := 1 to 4 do

for j := 1 to 7 do read(b[i,j]);

CP(A, 5, 6, KA);

CP(B, 4, 7, KB);

C := KA - KB;

writeln(C=, C:6:2);

End.

2.

.

Program P2_F;

Type

Matr = array[1..5, 1..7) of real;

Var

A, B: Matr;

i, j, C: integer;

Function CP(D: Matr; m, n: integer): integer;

var

i, j, KD: integer;

begin

KD := 0;

for i := 1 to m do

for j := 1 to n do

if d[i,j]>0 then KD := KD + 1;

CP := KD;

end;

Begin { }

writeln( A);

for i := 1 to 5 do

for j := 1 to 6 do read(a[i,j]);

writeln( ’);

for i := 1 to 4 do

for j := 1 to 7 do read(b[i,j]);

C := CP(A, 5, 6) - CP(B, 4, 7);

writeln(C=, C);

End.

9.

: (CHAR) (STRING).