Berikut adalah Source Code Program Penghitung Perkalian Matrik Semi Lengkap dalam Bahasa Pascal.

Data arsip dari Die Coding, silakan digunakan dan diubah sesuka hati, semoga bermanfaat.

program perkalianMatriks;
uses crt;

type ordo = array[1..100, 1..100] of integer;
//deklarasi variabel
var A, B, hasil : ordo;
	baris1, kolom1, baris2, kolom2, i, j, z : integer;
	pilihan : string;

//procedure identitas
procedure identitas;
begin
	clrscr;
	writeln(' ========================================');
	writeln('|                                        |');
	writeln('|                APLIKASI 1              |');
	writeln('|        PROGRAM PERKALIAN MATRIKS       |');
	writeln('|                                        |');
	writeln(' ========================================');
	writeln(' ');
	writeln(' ');
	writeln(' ========================================');
	writeln('|                                        |');
	writeln('|          source: diecoding.com         |');
	writeln('|                                        |');
	writeln(' ======================================== ');
	writeln(' ');
	writeln('');
	writeln('tekan enter untuk input data...'); readkey;
end;

//procedure inputMatrik
procedure inputMatrik;
begin
	clrscr;
	writeln('MATRIKS I');
	writeln;
	write( 'Masukan Banyak Baris : '); readln(baris1);
	write( 'Masukan Banyak Kolom : '); readln(kolom1);
	writeln;
	writeln;
	writeln( 'MATRIKS II');
	writeln;
	write( 'Masukan Banyak Baris : '); readln(baris2);
	write( 'Masukan Banyak Kolom : '); readln(kolom2);

	if kolom1 = baris2 then begin
		clrscr;
		writeln('Masukan data matriks I dimulai dari kolom pertama');
		writeln( 'MATRIKS I');

		for i := 1 to baris1 do begin
			writeln('Baris ',i,' ======');
			for j:= 1 to kolom1 do begin
				write(' e',i,',',j,' :');
				readln(A[i, j]);
			end;
	    end;

		clrscr;
		writeln('Masukan data matriks II dimulai dari kolom pertama');
		writeln ('MATRIKS II');

		for i := 1 to baris2 do begin
			writeln('Baris ' ,i,' =====');
			for j := 1 to kolom2 do begin
				write(' e',i,',',j,' :');
				readln(B[i, j]);
			end;
	    end;
	end else begin
		writeln;
		writeln;
		writeln;
		writeln('SYARAT PERKALIAN MATRIKS TIDAK TERPENUHI');
	end;
end;

//function hasil matriks
function hasilmatrik(): ordo;
begin
	clrscr;
	writeln( 'HASIL');
	//proses menghitung
	for i := 1 to baris1 do
		for j := 1 to kolom2 do begin
			hasil[i, j] := 0;
			for z := 1 to baris2 do
				hasil[i, j] := hasil[i, j] + A[i,z] * B[z, j];
		end;

	for i := 1 to baris1 do begin
		write('    |   ');
		for j := 1 to kolom2 do
			write(hasil[i, j],' ');
	    writeln(' | ');
	end;
end;

procedure penutup;
begin
    clrscr;
    writeln('  ------------------------------------------------- ');
    writeln(' |                                                 |');    
    writeln(' |         TERIMA KASIH TELAH MENGGUNAKAN          |');
    writeln(' |    PROGRAM PENGHITUNG PERKALIAN MATRIK KAMI     |');
    writeln(' |                                                 |');
    writeln('  ------------------------------------------------- ');
    write(' '); readkey;
end;

//program utama
begin
	identitas;
	repeat
        inputMatrik;
        hasilmatrik;
        //konfirmasi pengulangan program
        writeln;
		writeln;
		writeln;
		writeln('y untuk memasukan kembali matrik yang akan dikalikan');
		writeln('n untuk menutup aplikasi ini');
		write('Lanjut? y|n : '); readln(pilihan);
	until (pilihan = 'n') or (pilihan = 'N');
	penutup;
readkey;
end.