Output Penjumlahan Matrix: Program Matrix - Ripal Uses CRT
The document describes a program that adds two 2x3 matrices. It introduces the author and their student information. It then prompts the user to input values for the first and second matrices. The program displays the individual matrices and their sum, storing the result in a third matrix.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
25 views
Output Penjumlahan Matrix: Program Matrix - Ripal Uses CRT
The document describes a program that adds two 2x3 matrices. It introduces the author and their student information. It then prompts the user to input values for the first and second matrices. The program displays the individual matrices and their sum, storing the result in a third matrix.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3
OUTPUT
Penjumlahan Matrix
Muhammad Rivaldy R3M
201543500865
program matrix_ripal; uses crt;
var ripal1, ripal2, ripal3: array[1..2,1..3] of integer;
i,j: integer; begin clrscr; writeln ('Nama saya Muhammad Rivaldy'); writeln ('NPM 201543500865'); writeln ('Kelas R3M'); readln; writeln ('Matrix Pertama'); for i:=1 to 2 do for j:=1 to 3 do begin write ('Masukkan Baris [',i,'] dan Kolom [',j,'] Matrix: '); readln (ripal1[i,j]); end; writeln; writeln ('Matrix Kedua'); for i:=1 to 2 do for j:=1 to 3 do begin write ('Masukkan Baris [',i,'] dan Kolom [',j,'] Matrix: '); readln (ripal2[i,j]); end; readln; clrscr; writeln ('Inilah hasil dari kedua Matrix tersebut.'); writeln; writeln ('Matrix Pertama'); for i:=1 to 2 do begin for j:=1 to 3 do write (ripal1[i,j]:4); writeln; end; writeln; writeln ('Matrix Kedua'); for i:=1 to 2 do begin for j:=1 to 3 do write (ripal2[i,j]:4); writeln; end; readln; clrscr; writeln ('Sekarang kita Jumlahkan Kedua Matrix tersebut.'); writeln; writeln ('Hasil dari Penjumlahan Kedua Matrix tersebut.'); for i:=1 to 2 do for j:=1 to 3 do ripal3[i,j]:= ripal1[i,j] + ripal2[i,j]; for i:=1 to 2 do begin for j:=1 to 3 do write (ripal3[i,j]:4); writeln;