var A,B,C : Array [1..2,1..2] of integer; M,N: integer;
begin
A[1,1]:=1; A[2,1]:=0; B[1,1]:=1; B[2,1]:=0;
A[1,2]:=2; A[2,2]:=1; B[1,2]:=4; B[2,2]:=6;
for M:= 1 to 2 do
begin
for N:=1 to 2 do
begin
C[M,N]:=A[M,N]+B[M,N]; write (C[M,N],' ');
end;
writeln; end;
readln; end.
Hasil:
2 6
0 7
Sumber : Pra UTS ATA 2011//2012 Algoritma & Pemprograman 2
Tidak ada komentar:
Posting Komentar