stuktur data 1


JAWABAN TUGAS 1 - PERKALIAN MATRIX

program identitas_matrik;
uses WinCrt;
var
matrix:array[1..5,1..5]of integer;
x,y:integer;
begin
  for x:=1 to 5 do
  begin
    for y:=1 to 5 do
    begin
      matrix[x,y]:=0;
      if x+y=6 then matrix[x,y]:=1;
      write (matrix[x,y]:3);
    end;
   writeln;
  end;
end.
TAMPILAN OUTPUT DARI SCRIPT DI ATAS

JAWABAN TUGAS 2-MATRIX IDENTITAS(REVERSE)
program identitas_matrik;
uses WinCrt;
var
m:array[1..5,1..5]of integer;
x,y:integer;
begin
  for x:=1 to 5 do
  begin
    for y:=1 to 5 do
    begin
      m[x,y]:=0;
      if x+y=6 then m[x,y]:=1;
      write (m[x,y]:3);
    end;
   writeln;
  end;
end.

TAMPILAN OUTPUT DARI SCRIPT DI ATAS


1 komentar: (+add yours?)

Nisful Laily mengatakan...

chuz: ckckckckck....

Posting Komentar