(* BIT MATRIX MULTIPLICATION - KRONROD'S ALGORITHM *) PROGRAM CBITMULT (INPUT,OUTPUT) ; TYPE MATRIX=ARRAY[ 1..15,1..15 ] OF INTEGER ; VAR A,B,C : MATRIX ; N,I,J : INTEGER ; {EXTERNAL PROCEDURE BITMULT (N:INTEGER ; A,B:MATRIX ; VAR C:MATRIX) ;} {$I D:BITMULT.SRC} BEGIN (*CBITMULT*) READ(N); FOR I:=1 TO N DO BEGIN READLN ; FOR J:=1 TO N DO READ (A[I,J]) END ; FOR I:=1 TO N DO BEGIN READLN ; FOR J:=1 TO N DO READ (B[I,J]) END ; BITMULT (N,A,B,C) ; WRITELN ; WRITELN ('A':1) ; FOR I:=1 TO N DO BEGIN FOR J:=1 TO N DO WRITE (A[I,J]:3) ; WRITELN END ; WRITELN ; WRITELN ('B':1) ; FOR I:=1 TO N DO BEGIN FOR J:=1 TO N DO WRITE (B[I,J]:3) ; WRITELN END ; WRITELN ; WRITELN ; WRITELN ('C : A*B':7) ; FOR I:=1 TO N DO BEGIN FOR J:=1 TO N DO WRITE (C[I,J]:3) ; WRITELN END END.