Given two double variables, bestValue and secondBestValue, write some code that swaps their values.

Given two double variables, bestValue and secondBestValue, write some code that swaps their values.

LANGUAGE: Visual Basic

CHALLENGE:

Given two double variables, bestValue and secondBestValue, write some code that swaps their values. Declare any additional variables as necessary.

SOLUTION:

dim temp as Double
temp = bestValue
bestValue = secondBestValue
secondBestValue = temp 

Add comment