~ all about information is here ~

Saturday, March 3, 2012

Struktur Data - Matriks Identitas (Reverse)



Script program matriks identitas (reverse) :

Script program matriks identitas (reverse) :

program matriks_soal2_raffi_111221110;
uses WinCrt;
var
m:array[1..5,1..5]of integer;
x,y:integer;
begin
  for x:=1 to 5 do
  begin
   write ('[');
    for y:=1 to 5 do
    begin
      m[x,y]:=0;
      if x+y=6 then m[x,y]:=1;
      write (m[x,y]:2);
    end;
   write (']':2);
   writeln;
  end;
end.


1 comment: