Berikut adalah Source Code Penjumlahan 2 Matrik dalam Bahasa Pascal.

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

program jumlahMatriks;
uses crt;

type data = array[1..100, 1..100] of real;

var A, B, hasil : data;
    i, j, baris, kolom : integer;

begin
	clrscr;
	writeln (' ------------------------------------------ ');
	writeln ('|                                          |');
	writeln ('|           source: diecoding.com          |');
	writeln ('|                                          |');
	writeln (' ------------------------------------------ ');
	writeln;
    write ('Silakan tekan enter untuk melanjutkan..');
    readkey;
    while not eof do begin
        clrscr;
        writeln (' ---------------------------- ');
        writeln ('|       PROGRAM MATRIK        |');
        writeln (' ---------------------------- ');
        writeln;writeln;
        writeln('MATRIK A');
        write('Masukan banyak baris = '); readln(baris);
        write('Masukan banyak kolom = '); readln(kolom);
        for i := 1 to baris do
            for j := 1 to kolom do begin
                gotoxy(j*10, i*5);
                readln( A[i, j] );
            end;
        clrscr;

        writeln('MATRIK B');
        write('Masukan banyak baris = '); readln(baris);
        write('Masukan banyak kolom = '); readln(kolom);
        for i := 1 to baris do
            for j := 1 to kolom do begin
                gotoxy(j*10, i*5);
                readln( B[i, j] );
            end;
        clrscr;

        for i := 1 to baris do
            for j := 1 to kolom do begin
                hasil[i, j] := A[i, j] + B[i, j];
            end;

        writeln('Hasil [A] + [B] :');
        for i := 1 to baris do
            for j:=1 to kolom do begin
                gotoxy(j*10, i*5);
                write( hasil[i, j]:0:2 );
            end;
        readln;
    end;
end.