1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zaharov [31]
3 years ago
13

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

riables as necessary.
Computers and Technology
1 answer:
nikitadnepr [17]3 years ago
4 0
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;
}
You might be interested in
Show what this program prints. Be exact and complete. Can you explain the behavior of each print statement? 1 2 3 4 5 6 7 public
KengaRu [80]

Answer:

39 + 3

42

393

Explanation:

In this line System.out.println("39 + 3"), the quotation marks are used to delimit a string, then when printed in the console the string is printed as-is.

In the next line: System.out.println(39 + 3), without the quotation marks, the 39+3 is treated as a normal addition and prints the result of the operation.

In the last line printed with the code System.out.println("39" + 3,; the symbol + is used to concatenate the string 39 with the number 3, since the string has no spaces they are printed together.

3 0
3 years ago
Try making a character (string) variable and a logical variable . Try creating a variable with a "missing" value NA. You can cal
quester [9]

Answer:

The solution code is written in R script.

  1. #string variable
  2. character_str<- "Hello World"
  3. #logical variable
  4. logic <-  a > b
  5. #Missing value
  6. myVec <-c(1, 2, 3, NA)
  7. #Use class to check data type
  8. class(character_str)
  9. class(logic)
  10. class(myVec)

Explanation:

A string variable is a variable that hold a string (the letters enclosed within quotation marks) (Line 2)

A logical variable is a variable that hold a logical value (either True or False). The logical value is created by comparing two variables (Line 5).

In R, missing value is an unknown value which is represented by NA symbol (Line 8).  

We can use in-built method <em>class </em> to check for the variable type in R (Line 11-13). For example, the output of <em>class(character_str)</em> is "<em>character</em>"

8 0
3 years ago
When entering a function or formula in a cell, which is the first character
AnnZ [28]

Answer:

B

Explanation:

6 0
2 years ago
what are the main technologies that have contributed to be growth and commercialization of the Internet
iren [92.7K]

hope it helps have a good day

5 0
2 years ago
A user found that their personal data had been exfiltrated from their computer by a malicious program that they clicked on sever
Firlakuza [10]

Answer:

Assuming this can only have one answer, i believe adware is very far from the type of malware that did infect the system, Spyware.

Explanation:

8 0
3 years ago
Other questions:
  • Write the importance of cyber law? In point .<br>​
    10·2 answers
  • What is the name of the program that takes high-level code and transforms it into machine-level code?
    8·1 answer
  • You install an M.2 SSD card in an M.2 slot on a motherboard. When you boot up your system, you discover the DVD drive no longer
    15·1 answer
  • A mobile device has stopped receiving automatic OS updates that until recently were pushed to the device.
    7·2 answers
  • What did I do wrong? May you please correct it for me...I was also looking on how to delay when it prints. Like when it prints a
    9·1 answer
  • A user reports that he cleared a paper jam and now cannot print. The technician reseats the paper and then prints a test page fr
    14·1 answer
  • 1.6 code practice: question 1 edhesive
    12·2 answers
  • What would happen if computers only had input devices?
    9·1 answer
  • Multiple Choice
    8·1 answer
  • ______________________ can run on a workstation or server and is at the heart of all business applications.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!