11 Apr 2012

Program Perkalian Matriks Pascal

. 11 Apr 2012


program perkalian_matrix;

uses crt;

var

a,b,c : array [1..50,1..50] of integer;

i,j,k,x,y,z : integer;

begin

clrscr;



writeln(‘Ukuran matrix A’);

write(‘Baris : ‘);

readln(x);

write(‘Kolom : ‘);

readln(y);

writeln;

writeln;

writeln(‘Ukuran matrix B’);

writeln(‘Baris : ‘,y);

write(‘Kolom : ‘);

readln(z);

for i:=1 to x do

for j:=1 to y do

begin

write(‘Elemen A[',i,',',j,'] : ‘);

readln(a[i,j]);

end;

writeln;

for i:=1 to y do

for j:=1 to z do

begin

write(‘Elemen B[',i,',',j,'] : ‘);

readln(b[i,j]);

end;

for i:=1 to x do

for j:=1 to z do

for k:=1 to y do

c[i,j] := c[i,j] + a[i,k]*b[k,j];

writeln;

writeln;

writeln(‘Hasil dari perkalian Matrix A dengan Matrix B adalah : ‘);

Writeln;

for i:=1 to x do

begin

for j:=1 to z do

write(c[i,j],’ ‘);

writeln;

end;

writeln;

readln;

end.

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Posting Komentar

Silakan Tinggalkan pesan mengenai Blog ini, Tapi jangan Nyepam ya...Makasi atas Kunjunganya :)

Baca Juga Yang Ini :) :

 
Copyright 2008 New World Funday is proudly powered by Blogger.com | Template by o-om.com