Most highly trained and skilled professors, programmers, text books, etc. claim that to swap two variables, A and B, so that A contains B's value and B contains A's value, you need a third temporary variable, C.
Now, if you guys are so smart, then let me say this: There is a way to swap the two variables WITHOUT a third variable. Can anyone figure out this little riddle?Code:Dim a As Integer
Dim b As Integer
Dim c As Integer
Let a = 10
Let b = 20
'
' Swap them...
'
Let c = a ' c is 10
Let a = b ' a is 20
Let b = c ' b is 10
If you want a hint, wait for a few days, and I will post it.
Let's see how clever you all are.
