題組內容

一、考慮下列程式片段: for I= 1 to n-1 for J=I+1 to n if S(I) > S(J) then begin Temp = S(I); S(I) = S(J); S(J) = Temp endif

⑵上述程式片段之功能為何?(10 分)