Menulis hasil isian di atas *)
for i := 1 to 3 do
begin
for j:= 1 to 3 do
begin
write (' (i, j) =
', i, ',', j, ' => M1 [i, j] = ', M1 [i, j]);
end;
writeln;
end;
writeln ( ' Array of array :
');
(* Mengisi array of array :
perhatikan cara mengacu elemen *)
for i := 1 to 3 do
begin
for j := 1 to 3 do
begin
MA1 [i] [j] := i*j;
end;
end;
(* Menulis hasil isian di atas
*)
for i := 1 to 3 do
begin
for j := 1 to 3 do
begin
(* Cobalah dua instruksi
write sbb : *)
(* write(' (i,j) = ', i,
', ', j, ' => MA1[i,j] = ',MA1[i,j] ); *)
write ('(i,j) = ',
i, ', ', j, ', => MA1 [i,j] = ',MA1 [i][j] );
end;
writeln;
end;
end.
Tidak ada komentar:
Posting Komentar