Kamis, 16 Mei 2013

Program Pascal Array untuk mencetak matriks 3x3


program matriks_identitas_3x3;
uses wincrt;
var matrik:array[1..3,1..3] of integer;
i,j:byte;
begin
writeln('Matriks identitas 3x3 :');
matrik[1,1] := 1;
matrik[1,2] := 0;
matrik[1,3] := 0;
matrik[2,1] := 0;
matrik[2,2] := 1;
matrik[2,3] := 0;
matrik[3,1] := 0;
matrik[3,2] := 0;
matrik[3,3] := 1;
for i:= 1 to 3 do
begin
for j:=1 to 3 do
write (matrik[i,j]:5);
writeln;
end;
end.

0 komentar:

Posting Komentar

You can replace this text by going to "Layout" and then "Page Elements" section. Edit " About "

Baca Selengkapnya Di : http://indonesianblog-jmk.blogspot.com/2012/06/cara-membuat-komentar-admin-berbeda.html#ixzz2kb6khEJE