158k views
3 votes
Given two double variables, bestvalue and secondbestvalue, write some code that swaps their values. declare any additional variables as necessary.

User Vinga
by
6.0k points

1 Answer

2 votes
double temp;

temp = bestValue;
bestValue = secondBestValue;
secondBestValue = temp;
User Snwflk
by
6.0k points