var A: array[1..5] of longint = (1, 2, 3, 4, 5); i, j, t: longint; begin for i := 1 to 5 do for j := 1 to i do begin t := A[i] xor A[j]; A[i] := t xor A[i]; A[j] := t xor A[i] end; for i := 1 to 5 do begin if (i <> 1) then write(' '); write(A[i]) end; writeln; end.
Apa hasil dari program tersebut?
A. 2 5 4 3 1
B. 5 4 3 2 1
C. 3 1 4 2 5
D. 2 1 3 5 4
E. 1 4 2 5 3