好吧,还是冒泡吧,下面是一个过程,楼楼自己领会吧 public sub mprank(byval ain() as long)'传入数组最小下标必须为1 dim a as long,b as long,t as long for a=1 to ubound(ain)-1 for b=1 to ubound(ain)-1 if ain(b)<ain(b+1) then t=ain(b) ain(b)=ain(b+1) ain(b+1)=t end if'降序排序 next next end sub