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
andreev551 [17]
3 years ago
9

Three different numbers need to be placed in order from least to greatest. For example, if the numbers are ordered 9, 16, 4, the

y should be reordered as 4, 9, 16. Which of the following algorithms can be used to place any three numbers in the correct order?
If the first number is greater than the last number, swap them. Then, if the first number is greater than the middle number, swap them.

If the first number is greater than the last number, swap them. Then, if the first number is greater than the middle number, swap them.
A

If the first number is greater than the middle number, swap them. Then, if the middle number is greater than the last number, swap them.

If the first number is greater than the middle number, swap them. Then, if the middle number is greater than the last number, swap them.
B

If the first number is greater than the middle number, swap them. Then, if the middle number is greater than the last number, swap them. Then, if the first number is greater than the last number, swap them.

If the first number is greater than the middle number, swap them. Then, if the middle number is greater than the last number, swap them. Then, if the first number is greater than the last number, swap them.
C

If the first number is greater than the middle number, swap them. Then, if the middle number is greater than the last number, swap them. Then, if the first number is greater than the middle number, swap them.
Computers and Technology
1 answer:
Anna11 [10]3 years ago
3 0

Answer:A

Explanation:

You might be interested in
Explain how it makes you feel that you must share the road with others
Tpy6a [65]
I feel like it is good to share the road.

8 0
3 years ago
Write a recursive method called repeat that accepts a string s and an integer n as parameters and that returns s concatenated to
svp [43]

Answer:

public static String repeat(String text, int repeatCount) {

   if(repeatCount < 0) {

       throw new IllegalArgumentException("repeat count should be either 0 or a positive value");

   }

   if(repeatCount == 0) {

       return "";

   } else {

       return text + repeat(text, repeatCount-1);

   }

}

Explanation:

Here repeatCount is an int value.

at first we will check if repeatCount is non negative number and if it is code will throw exception.

If the value is 0 then we will return ""

If the value is >0 then recursive function is called again untill the repeatCount value is 0.

6 0
3 years ago
Element primer a partir del qual es generarà l'energia central solar fotovoltaica
Juliette [100K]
No speak a Spanish ............
7 0
3 years ago
What is a dynamic CMOS circuit?
dybincka [34]

Answer:

Dynamic circuit class, which relies on temporary storage of signal values on the capacitance of high- impedance circuit nodes. In this section, an alternate logic style called dynamic logic is presented that obtains a similar result, while avoiding static power consumption.

Explanation:

Please Mark me brainliest

6 0
3 years ago
Write a statement to declare and initialize an array of int named denominations that contains exactly six elements. Your declara
lawyer [7]

Answer:

// here is statement in C++ to declare and initialize an array.

int denominations[]={1, 5, 10, 25, 50, 100};

Explanation:

In C++, an array can be declare and initialize in a single statement.Syntax to declare and initialize an array in C++ is type <type> <name>[]={val1,vale2...valn}. Here first literal is type of array and second is name of the array.And in the {} braces value of the array.In the above statement type is integer and name of the array is "denominations" and the values are 1,5,10,25,50,100.

//here is implementation in C++.

// include headers

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// declare and initialize array

int denominations[]={1, 5, 10, 25, 50, 100};

return 0;

}

7 0
4 years ago
Other questions:
  • How can rows be added to a table? Check all that apply
    13·2 answers
  • Why have the 'taskmasters' been answering questions so long but they're still only at the ambitious rank?
    14·1 answer
  • Pinterest, a visual bookmarking Website, logs more than 14 terabytes of new data each day, which means its storage needs are con
    10·1 answer
  • 1. Suppose a process in Host C has a UDP socket with port number 6789. Sup- pose both Host A and Host B each send a UDP segment
    5·1 answer
  • Instructions:Select the correct answer.
    6·2 answers
  • In which type of modulation is a 1 distinguished from a 0 by shifting the direction in whichthe wave begins?
    14·1 answer
  • Write the method addItemToStock to add an item into the grocery stock array. The method will: • Insert the item with itemName ad
    12·1 answer
  • Display the total number of parking tickets.
    5·1 answer
  • 1
    5·2 answers
  • bro i got banned for posting an amazing bulk pic, but this dude literally posted an inappropriate, dafuq is wrong with this bann
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!