1、Z=X:X=Y:Y=Z 2、 if A<B then X=A:A=B:B=X end if if A<C then X=A:A=C:C=X end if if B<C then X=B:B=C:C=X end if
1. s=x x=y y=s 2.max=a if a<b then max=b end if if max<c then max=c end if
Private Sub Form_Load() Me.AutoRedraw = TrueDim a As Long, y As Long, c As Long, t As Longa = 5 b = 8 c = 99t = aIf t < b Then swap t, b If t < c Then swap t, ca = t If b < c Then swap b, cPrint a Print b Print cEnd SubSub swap(a As Variant, b As Variant) t = a a = b b = t End Sub
2、
if A<B then
X=A:A=B:B=X
end if
if A<C then
X=A:A=C:C=X
end if
if B<C then
X=B:B=C:C=X
end if
s=x
x=y
y=s
2.max=a
if a<b then
max=b
end if
if max<c then
max=c
end if
Me.AutoRedraw = TrueDim a As Long, y As Long, c As Long, t As Longa = 5
b = 8
c = 99t = aIf t < b Then swap t, b
If t < c Then swap t, ca = t
If b < c Then swap b, cPrint a
Print b
Print cEnd SubSub swap(a As Variant, b As Variant)
t = a
a = b
b = t
End Sub
a=b
b=x
x=x+y
y=x-y
x=x-y