Aubee4483 Aubee4483
  • 09-09-2017
  • Computers and Technology
contestada

Given two double variables, best value and second best value, write some code that swaps their values. declare any additional variables as necessary.

Respuesta :

kaevras
kaevras kaevras
  • 11-09-2017
As I say to any people requesting programming help on these forums, I always suggest that you include what language you're using in the question, otherwise you may not get the answer you're looking for.

Here's an example in C++, and note that I'm only showing the function, and not the entire code:


static void swap(double& one, double& two)
{
    double temp = one;
    one = two;
    two = temp;
}
Answer Link

Otras preguntas

I have 7 hundreds blocks, 5 tens blocks, and 8 ones blocks. I use my blocks to model two 3-digit numbers. What could my two numbers be?
calculate the area of a circle with radius of 5cm
is the constitution likely to survive as long as the magna carta?
Which sentence uses commas correctly? A. Valerie place your books, on this desk. B. Write your name, Holly on the attendance list. C. Sit Jay, on that cushi
What is the value of 9x27 + 2x31 - 28 = n
How do you ask what someone is like in spanish? como te llamas como es como soy como estas
The Articles of Confederation represented the Americans' distrust of
How much pure acid should be mixed with 2 gallons of a 40% acid solution in order to to get a 70% acid solution
Write a decimal where the value of a digit is 1/10 as much as a digit in another place
Which vacuole-like structures break down and recycle cell parts?