Vocaloid - Gumi

Music Player

Kamis, 26 Maret 2015

PERKALIAN MATRIX (tamfan)

var b,k,bbb,kkk,mat:integer; a:array[1..100,1..100]of integer; z:array[1..100,1..100]of integer; begin writeln('masukkan jumlah baris matrix'); readln(b); writeln('masukkan jumlah kolom matrix'); readln(k); writeln('untuk matrix ke 1'); for bbb:=1 to b do begin writeln ('baris ke ',bbb); for kkk:= 1 to k do begin writeln ('kolom ke ',kkk); readln (a[bbb,kkk]); end; end; writeln('untuk matrix ke 2'); for bbb:=1 to b do begin writeln ('baris ke ',bbb); for kkk:= 1 to k do begin writeln ('kolom ke ',kkk); readln (z[bbb,kkk]); end; end; writeln('hasil penjumlahan kedua matrix adalah'); for bbb:=1 to b do begin for kkk:=1 to k do begin write(a[bbb,kkk]+z[bbb,kkk]); end; writeln; end; end.