Код
PROGRAM PR1;
TYPE MAS=ARRAY[1..30,1..30] of REAL;
VAR A1,A2,A3,B1,B2,B3:MAS;N1,N2,N3,M1,M2,M3,k1,k2,k3,t1,t2,t3:in teger;
PROCEDURE VVOD(VAR A:MAS;VAR N,M:INTEGER;Q:string);
VAR i,j:integer;
Begin
WRITE('Введите число элементов массива',Q);
READLN(N);
WRITE('Введите элементы массива',Q);
READLN(N);
FOR i:=1 to N DO
FOR j:=1 to M DO
BEGIN
WRITELN(Q,'[',i,',',j,']=');
READLN(A[i,j]);
END;
END;
PROCEDURE FORM(A:MAS;N,M:integer;VAR B:MAS;
VAR k,t:integer);
VAR i,j:integer;
BEGIN
k:=0;
t:=0;
FOR i:=1 to N DO
FOR j:=1 to M DO
IF(A[i,j]>0)THEN
BEGIN
k:=k+1;
t:=t+1;
END;
END;
PROCEDURE VIVOD(B:MAS;k,t:integer;Q:string);
VAR i,j:integer;
Begin
FOR i:=1 to k DO
FOR j:=1 to t DO
WRITELN(Q,'[',i,']=',B[i,j]);
END;
BEGIN
VVOD(A1,N1,M1,'A1');
VVOD(A2,N2,M2,'A2');
VVOD(A3,N3,M3,'A3');
FORM(A1,N1,M1,B1[1],B1[2]);
FORM(A2,N2,M2,B2[1],B2[2]);
FORM(A3,N3,M3,B3[1],B3[2]);
VIVOD(B1);
VIVOD(B2);
VIVOD(B3);
END.