求助高手帮忙编辑一段VBS代码
求助高手编辑一段VBS代码vbs我是一个菜鸟!求助高手帮忙编辑一段VBS代码,已知有A,B,C代表三个数,请用vbs先给这三个数从大到小排序!在按下面的函数公式编辑一下!
MIN((A-B)+1,(C-B)+11,(B-C)+11),不知道能不能看明白!
[ 本帖最后由 qiwa 于 2012-5-25 09:59 编辑 ]
<% Function Sizf(a) Dim Max :Max=0 Dim Min :Min=999 t=split(a,",") For i=0 To 2 If Cint(t(i))>Max Then Max = Cint(t(i)) End If If Cint(t(i))<Min Then Min = Cint(t(i)) End If Next For j=0 to 2 If Cint(t(j))<Max and Cint(t(j))>min Then Midd = Cint(t(j)) End If Next Sizf =Max&","&Midd&","&Min End Function wang =split(Sizf("3,18,5"),",") a=Cint(wang(0)) b=Cint(wang(1)) c=Cint(wang(2)) nResult=((a)-(b))+1'15 if ((c)-(b))+11<nResult then nResult=((c)-(b))+11 end if if ((b)-(a))+11<nResult then nResult=((b)-(a))+11 end if Sizfabc=nResult Response.Write(Sizfabc) %>