procedure perkalian(var a,b:matrix ; n:integer); var c : matrix; i,j,k : integer; begin writeln; writeln('Hasil Perkalian Matriks'); for i:=1 to 3 do begin for j:=1 to 3 do begin c[i,j]:=0; { inisialisasi C[i,j] dengan 0 } for k:=1 to 3 do c[i,j] :=c[i,j]+ a[i,k] * b[k,j]; write(c[i,j]:4); end; writeln; end; end; end; |
Tidak ada komentar:
Posting Komentar