var arr:array[0..5] of integer; i,j:integer; itemp:integer; begin arr[0]:=1; arr[1]:=71; arr[2]:=5; arr[3]:=31; arr[4]:=2; arr[5]:=12; for i:=0 to 5 do for j:=0 to 4-i do begin itemp:=arr[j]; if itemp<arr[j+1] then begin arr[j]:= arr[j+1]; arr[j+1]:=itemp; end; end; for i:= 0 to 5 do memo1.Lines.Add(inttostr(arr[i])); end;
标签:do,arr,itemp,begin,冒泡排序,一种,integer,写法 From: https://www.cnblogs.com/zhusd/p/17221690.html