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

whats 3/4 plus 1/8 ????
Anna is planting corn on her farm. What is the area of the cornfield 5/6mi and 1/2 mi
Mary rode her bike for 2 2/5 miles on Wednesday. On Thursday, she biked 1 1/4 times as far as on Wednesday. How many miles did Mary bike on Thursday?
Ivan found an old map of the United States with a scale of 3.5 centimeters = 210 miles. If the two cities are actually 120 miles apart, how far apart are the ci
The ratio of boys and girls at the beach cleanup was 7:8. If there were 42 boys, how much girls were there
The Smiths spend 12% of their budget on entertainment. Their total budget this year is $2,000 more than last year, and this year they plan to spend $5,640 on en
Suppose individuals of a species of lizard on an island can be brown, tan, or green. Suppose a volcanic eruption on the island kills all but one male and one fe
Which statements would the author most likely agree with?
What did Richard Arkwright invent
Solve the inequality 0 > –3x – 2x.