三个数排序的简单问题 a b c三个数,如何从小到大顺序排序??????给出最简单的算法,越简洁越好! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 dim tmpdo until a>b and b>cif b<c then tmp=b b=c c=tmpend ifif a<b then tmp=a a=b b=tmpend ifloop If a > b Then t = a: a = b: b = tIf c < a Then Print c, a, bIf c >= a And c <= b Then Print a, c, bIf c > b Then Print a, b, c sub swap(int a,int b) dim t as int t=a a=b b=tend subif a>b then swap a,bif a>c then swap a,cif b>c then swap b,cprint a,b,c始终让第一个数为最小. a=(a<b) ? ((a<c)? a:c ) : ((b<c)? b:c)'找出最小值:ab=(b<c) ? b : c '(a值已变,但其它值未变)找出b,c中的最小值c=c '剩下的一个即为最大值:c SetCursorPos 在不同分辨率的定点问题 关于打印条形码的问题?谢谢! 有关Format的简单问题~ 刚学游标,试着写了一下,不过运行出错呢. 请各位帮忙>>关于改变图片格式的问题,在线等待 SQL SERVER的奇怪问题? 怎样做连接数据库的全局变量? Recordset问题 ADO的recordset对象在使用SQL语句查询时不正常,急!急!急!flash! 请问有谁知道“LCase(Decrypt(Trim(x)))"这句程序的意思? 公共模块级变量connection的使用!在线讨论! 怎样在vb中打开一个Excel,并任意操纵它??
do until a>b and b>c
if b<c then
tmp=b
b=c
c=tmp
end if
if a<b then
tmp=a
a=b
b=tmp
end if
loop
If c < a Then Print c, a, b
If c >= a And c <= b Then Print a, c, b
If c > b Then Print a, b, c
dim t as int
t=a
a=b
b=t
end subif a>b then swap a,b
if a>c then swap a,c
if b>c then swap b,cprint a,b,c始终让第一个数为最小.
b=(b<c) ? b : c '(a值已变,但其它值未变)找出b,c中的最小值
c=c '剩下的一个即为最大值:c