clear
input "a=" to a
input "b=" to b
input "c=" to c
if a t=a
a=b
b=t
endif
if a
a=c
c=t
endif
if b
b=c
c=t
endif
?"这三个数由大到小为:" ,a,b,c
return
clear
dime a(3)
for i=1 to 3
input "请输入一个数:" to a(i)
endfor
?"降序排列为:"
for i=1 to 2
for j=i+1 to 3
if a(i) k=a(i)
a(i)=a(j)
a(j)=k
endif
endfor
??alltrim(str(a(i)))+" "
endfor
??alltrim(str(a(i)))
此程序适合任意多个数排序,只需要修改相应的数字就行了。