冒泡排序Pascal代码
program aa;
var
s,r:array[1..100] of integer;
a,b,c,max,d,e,f,g,h,i,j,k,l,m,n:integer;
begin
max:=0;
for i:=1 to 10 do
read(r[i]);
for i:=10 downto 2 do
for a:=1 to i-1 do
if r[a]
max:=r[a];
r[a]:=r[a+1];
r[a+1]:=max;
end;
for i:=1 to 10 do
writeln(r[i]);
end.