A. Delphi 排序
vara:array[0..3]ofInteger;
b:Integer;
i,j:Integer;
begin
a[0]:=StrToInt(Edit1.Text);
a[1]:=StrToInt(Edit2.Text);
a[2]:=StrToInt(Edit3.Text);
a[3]:=StrToInt(Edit4.Text);
fori:=0to2do
forj:=i+1to3do
ifa[i]<a[j]then
begin
b:=a[i];
a[i]:=a[j];
a[j]:=b;
end;
Label1.Caption:=IntToStr(a[0]);
Label2.Caption:=IntToStr(a[1]);
Label3.Caption:=IntToStr(a[2]);
Label4.Caption:=IntToStr(a[3]);
end;