743
社区成员
发帖
与我相关
我的任务
分享
for m=1 to l - 1
num1=integer(out_number[m]);
for n=m+1 to l - 1 ////
num2=integer(out_number[n]);
if(num1 < num2) then
tmp[1]=out_number[m];out_number[m]=out_number[n];out_number[n]=tmp[1];
tmp[2]=class[m];class[m]=class[n];class[n]=tmp[2];
tmp[3]=code[m];code[m]=code[n];code[n]=tmp[3];
tmp[4]=namename[m];namename[m]=namename[n];namename[n]=tmp[4];
end if
next
next
for m=1 to l - 1
num1=integer(out_number[m]);
for n=m+1 to l - m - 1
num2=integer(out_number[n]);
if(num1 < num2) then
tmp[1]=out_number[m];out_number[m]=out_number[n];out_number[n]=tmp[1];
tmp[2]=class[m];class[m]=class[n];class[n]=tmp[2];
tmp[3]=code[m];code[m]=code[n];code[n]=tmp[3];
tmp[4]=namename[m];namename[m]=namename[n];namename[n]=tmp[4];
end if
next
next